FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-14-2008, 12:33 PM
Xavier
 
Default libarchive version check

On Wed, May 14, 2008 at 2:14 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>
> On Wed, May 14, 2008 at 6:50 AM, Xavier <shiningxc@gmail.com> wrote:
> > On Wed, May 14, 2008 at 1:16 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
> >> Can we add a check on the libarchive version number when configuring
> >> pacman. You can run configure without a problem with a libarchive 1.x
> >> version but not actually complete the build. See
> >> http://bbs.archlinux.org/viewtopic.php?pid=367593
> >>
> >> I know next to nothing about libarchive so I am giving this to someone
> >> else to take care of!
> >>
> >
> > I doubt many ppl are still trying to build pacman with libarchive 1.x.
> > Yeah, one did but well..
> > But in any cases, I am curious to know how to check version number at
> > configure time. I don't know how to do it either.
> > Though I believe I know one way to prevent the specific error that
> > user was having. We could replace this stuff in configure.ac :
> > # Check for libarchive
> > AC_CHECK_LIB([archive], [archive_read_data], ,
> > AC_MSG_ERROR([libarchive is needed to compile pacman!]))
> > by this :
> > # Check for libarchive
> > AC_CHECK_LIB([archive], [archive_read_open_filename], ,
> > AC_MSG_ERROR([libarchive is needed to compile pacman!]))
> >
> > What I don't know is when this read_open_filename function was introduced.
> > And also what is the oldest libarchive version with which pacman is
> > guaranteed to work.
>
> I would suggest someone grab the last libarchive 1.X release and the
> first libarchive 2.X release and compare the header files. See if
> there is an new function introduced in 2.X that we can use instead to
> verfiy you are using a new enough version.
>

Actually it's silly, this archive_read_open_filename function appeared
between 1.2.38 and 1.2.57, the two only 1.2.x releases left there :
http://people.freebsd.org/~kientzle/libarchive/src/
That 1.2.53 version this guy was using on debian doesn't even exist
anymore. And that's indeed the version debian stable is using.
(testing has 2.4.11 and unstable has 2.4.17).

I don't know if pacman would work with 1.2.57 :P

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-14-2008, 12:47 PM
"Dan McGee"
 
Default libarchive version check

On Wed, May 14, 2008 at 7:33 AM, Xavier <shiningxc@gmail.com> wrote:
> On Wed, May 14, 2008 at 2:14 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>>
>> On Wed, May 14, 2008 at 6:50 AM, Xavier <shiningxc@gmail.com> wrote:
>> > On Wed, May 14, 2008 at 1:16 PM, Allan McRae <mcrae_allan@hotmail.com> wrote:
>> >> Can we add a check on the libarchive version number when configuring
>> >> pacman. You can run configure without a problem with a libarchive 1.x
>> >> version but not actually complete the build. See
>> >> http://bbs.archlinux.org/viewtopic.php?pid=367593
>> >>
>> >> I know next to nothing about libarchive so I am giving this to someone
>> >> else to take care of!
>> >>
>> >
>> > I doubt many ppl are still trying to build pacman with libarchive 1.x.
>> > Yeah, one did but well..
>> > But in any cases, I am curious to know how to check version number at
>> > configure time. I don't know how to do it either.
>> > Though I believe I know one way to prevent the specific error that
>> > user was having. We could replace this stuff in configure.ac :
>> > # Check for libarchive
>> > AC_CHECK_LIB([archive], [archive_read_data], ,
>> > AC_MSG_ERROR([libarchive is needed to compile pacman!]))
>> > by this :
>> > # Check for libarchive
>> > AC_CHECK_LIB([archive], [archive_read_open_filename], ,
>> > AC_MSG_ERROR([libarchive is needed to compile pacman!]))
>> >
>> > What I don't know is when this read_open_filename function was introduced.
>> > And also what is the oldest libarchive version with which pacman is
>> > guaranteed to work.
>>
>> I would suggest someone grab the last libarchive 1.X release and the
>> first libarchive 2.X release and compare the header files. See if
>> there is an new function introduced in 2.X that we can use instead to
>> verfiy you are using a new enough version.
>>
>
> Actually it's silly, this archive_read_open_filename function appeared
> between 1.2.38 and 1.2.57, the two only 1.2.x releases left there :
> http://people.freebsd.org/~kientzle/libarchive/src/
> That 1.2.53 version this guy was using on debian doesn't even exist
> anymore. And that's indeed the version debian stable is using.
> (testing has 2.4.11 and unstable has 2.4.17).
>
> I don't know if pacman would work with 1.2.57 :P

Between 1.3.1 and 2.0.20, we have the following new functions (diff
the headers):
int archive_read_support_format_empty(struct archive *);
int archive_write_finish_entry(struct archive *);
void archive_clear_error(struct archive *);

struct archive *archive_write_disk_new(void);
/* This file will not be overwritten. */
int archive_write_disk_set_skip_file(struct archive *,
dev_t, ino_t);
/* Set flags to control how the next item gets created. */
int archive_write_disk_set_options(struct archive *,
int flags);


Of course, we don't really use any of those in our code, but they
would be able to tell us the difference between 1.X and 2.X. We do
write things to disk, so checking for archive_write_disk_new might not
be a terrible idea.

-Dan

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 
Old 05-14-2008, 02:17 PM
Xavier
 
Default libarchive version check

On Wed, May 14, 2008 at 2:14 PM, Dan McGee <dpmcgee@gmail.com> wrote:
>
> I would suggest someone grab the last libarchive 1.X release and the
> first libarchive 2.X release and compare the header files. See if
> there is an new function introduced in 2.X that we can use instead to
> verfiy you are using a new enough version.
>
> Of course, while you have that original 2.X package, you might want to
> verify it actually compiles against it.
>
> The only other option looks to be diving into AC_LANG_PROGRAM and
> writing a test that actually has a valid type declaration?
>

So I guess that is yet another advantage of pkgconfig which allows to
do stuff like this :
PKG_CHECK_MODULES([MYSTUFF], [gtk+-2.0 >= 1.3.5 libxml = 1.8.4])
Though even if we made a pkgconfig file for libarchive and it was
accepted, it would only be available in the new version and not in all
older ones.
But maybe that is not a problem, people should probably just use the
latest release of libarchive.

_______________________________________________
pacman-dev mailing list
pacman-dev@archlinux.org
http://archlinux.org/mailman/listinfo/pacman-dev
 

Thread Tools




All times are GMT. The time now is 07:34 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org