Re: [Leaf-devel] Admin script help

2002-04-14 Thread Mike Noyes

On Sun, 2002-04-14 at 11:40, guitarlynn wrote:
> On Sunday 14 April 2002 11:53, Mike Noyes wrote:
> > Jeff,
> > I modified your script, and added Lynn's awk line. I hope I didn't
> > muck it up to bad.
> 
> Looks OK to me if the output is correct.

Lynn,
It appears to be. All of the packages I've run it on generated
acceptable output. The awk line complains when there is no .version
file, but that's ok.

> > Everyone,
> > Is there a reason that our packages don't contain the program name in
> > the version file?
> 
> The majority of packages seem to work that way I imagine that 
> they were done this way since you should already know the
> 'basename' to check the version #. 
> 
> The package listing you're making would be the first time that we've
> had a good reason for implicitly putting the packagename in the 
> version file.

What I want is the program name, not the package name. As you correctly
stated above, the package name is already known.

> Adding: echo 'basename $1' should give the packagename
> if you want that in the output as well.

Thanks. :-)

> > I've been looking at the ldd output, and I'm having a hard time
> > figuring out how to determine glibc versions from its output. The
> > best I've come up with is to look for the presence of libm.so.6. Is
> > that correct?
> 
> libc.so.6 was used as far back as libc-2.0.x from what I could find.
> I couldn't locate if it was actually in libc-2.0.x or backported from
> later release of libc for compatibility. Anyone that has worked
> making any libc-2.1+ packages probably knows.

So, how do I determine the glibc version? Do I have to use the hex
number, and find a reference that will list the various versions? Any
help is appreciated.

-- 
Mike Noyes <[EMAIL PROTECTED]>
http://sourceforge.net/users/mhnoyes/
http://leaf-project.org/


___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-14 Thread guitarlynn

On Sunday 14 April 2002 11:53, Mike Noyes wrote:

> Jeff & Lynn,
> Thanks for the help. :-)
>
> Jeff,
> I modified your script, and added Lynn's awk line. I hope I didn't
> muck it up to bad.

Looks OK to me if the output is correct.

> Everyone,
> Is there a reason that our packages don't contain the program name in
> the version file?

The majority of packages seem to work that way I imagine that 
they were done this way since you should already know the
'basename' to check the version #. 

The package listing you're making would be the first time that we've
had a good reason for implicitly putting the packagename in the 
version file. 

Adding: echo 'basename $1' should give the packagename
if you want that in the output as well.


> I've been looking at the ldd output, and I'm having a hard time
> figuring out how to determine glibc versions from its output. The
> best I've come up with is to look for the presence of libm.so.6. Is
> that correct?

libc.so.6 was used as far back as libc-2.0.x from what I could find.
I couldn't locate if it was actually in libc-2.0.x or backported from
later release of libc for compatibility. Anyone that has worked
making any libc-2.1+ packages probably knows.


-- 

~Lynn Avants
aka Guitarlynn

guitarlynn at users.sourceforge.net
http://leaf.sourceforge.net

If linux isn't the answer, you've probably got the wrong question!

___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-14 Thread Mike Noyes

On Sat, 2002-04-13 at 12:36, Jeff Newmiller wrote:
> perhaps
> 
>  #!/bin/sh
>  TMPDIR=/tmp/lrpdd
>  ORIGDIR=`pwd`
> 
>  if [ "" == "$1" ]; then
> echo "usage : lrpldd lrpfilename"
>  elif [ -r "$1" ]; then
> mkdir $TMPDIR
> cd $TMPDIR
> tar xzf $1
> find . -type f -exec ldd \{} \; 2>/dev/null \
>   | grep -v ':$' | sort | uniq
> cd $ORIGDIR
> rm -R $TMPDIR
>  else
> echo "lrpldd : \"$1\" not found"
>  fi
> 
> would be more effective?

Jeff & Lynn,
Thanks for the help. :-)

Jeff,
I modified your script, and added Lynn's awk line. I hope I didn't muck
it up to bad.

#! /bin/bash
TMPDIR=temp
ORIGDIR=`pwd`

if [ "" == "$1" ]; then
   echo "usage : ./ldd-ver.sh lrpfilename"
elif [ -r "$1" ]; then
   mkdir $TMPDIR
   cp "$1" $TMPDIR
   cd $TMPDIR
   tar xzf `basename $1`
   find . -type f -exec ldd \{} \; 2>/dev/null \
 | grep -v ':$' | sort | uniq
   awk '{print $1}' var/lib/lrpkg/`basename $1 .lrp`.version
   cd $ORIGDIR
   rm -rf $TMPDIR
else
   echo "lrpldd : \"$1\" not found"
fi


Everyone,
Is there a reason that our packages don't contain the program name in
the version file?

I've been looking at the ldd output, and I'm having a hard time figuring
out how to determine glibc versions from its output. The best I've come
up with is to look for the presence of libm.so.6. Is that correct?

Example of glibc 2.0 output:
$ ./ldd-ver.sh packages/snort.lrp   
libc.so.6 => /lib/libc.so.6 (0x40041000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)
/lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4002a000)
not a dynamic executable
1.5-1

Example of glibc 2.1 output:
$ ./ldd-ver.sh packages/squid-2.lrp 
libcrypt.so.1 => /lib/libcrypt.so.1 (0x40028000)
libc.so.6 => /lib/libc.so.6 (0x40028000)
libc.so.6 => /lib/libc.so.6 (0x40053000)
libc.so.6 => /lib/libc.so.6 (0x40073000)
libc.so.6 => /lib/libc.so.6 (0x400a)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x4000)
/lib/libNoVersion.so.1 => /lib/libNoVersion.so.1 (0x40017000)
libm.so.6 => /lib/libm.so.6 (0x40028000)
libm.so.6 => /lib/libm.so.6 (0x40055000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4003c000)
libnsl.so.1 => /lib/libnsl.so.1 (0x4005c000)
libnsl.so.1 => /lib/libnsl.so.1 (0x40089000)
libresolv.so.2 => /lib/libresolv.so.2 (0x4002a000)
libresolv.so.2 => /lib/libresolv.so.2 (0x4004a000)
libresolv.so.2 => /lib/libresolv.so.2 (0x40077000)
not a dynamic executable
2.4.STABLE4

-- 
Mike Noyes <[EMAIL PROTECTED]>
http://sourceforge.net/users/mhnoyes/
http://leaf-project.org/


___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-13 Thread Jeff Newmiller

On 13 Apr 2002, Mike Noyes wrote:

> On Sat, 2002-04-13 at 09:06, Brad Fritz wrote:
> > 
> > On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote:
> > 
> > > Anyone,
> > > Is there a way to get tar to return the date of the most recent file in
> > > a tarball?
> > > 
> > > Example:
> > > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp
> > > -rwxr-xr-x root/root  9648 2001-12-17 06:42:08 usr/bin/cal
> > > -rw-r--r-- root/root32 2001-12-17 06:42:21
> > > var/lib/lrpkg/cal.list
> > > 
> > > Desired output: 2001-12-17
> > 
> > If you can't get tar to tell you directly,
> > 
> >   tar tvfz $TARBALL_FILE \
> > | awk '{print $4}' \
> > | sort -n \
> > | tail -n 1
> > 
> > might work for you.
> 
> Brad,
> Thanks. This works fairly well. I still get errors from tar, but I don't
> see any way to force it to ignore them.

perhaps

  tar tvfz $TARBALL_FILE 2>/dev/null \
| awk '{print $4}' \
| sort -n \
| tail -n 1

[...]

> Now all I have to do is get the program name and version. Then determine
> the libc version with ldd.
> 
> Jeff provided this snippet for checking the libc version with ldd.
> 
>   md ${package} 
>   cd ${package} 
>   gunzip ${packagelrppath} 
>   ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` \ 
> | grep -v ':$' | sort | uniq 
>   cd .. 
>   rm -R ${package}

perhaps

 #!/bin/sh
 TMPDIR=/tmp/lrpdd
 ORIGDIR=`pwd`

 if [ "" == "$1" ]; then
echo "usage : lrpldd lrpfilename"
 elif [ -r "$1" ]; then
mkdir $TMPDIR
cd $TMPDIR
tar xzf $1
find . -type f -exec ldd \{} \; 2>/dev/null \
  | grep -v ':$' | sort | uniq
cd $ORIGDIR
rm -R $TMPDIR
 else
echo "lrpldd : \"$1\" not found"
 fi

would be more effective?  If I provided that snippet verbatim, I must have
been sleepy :)

---
Jeff NewmillerThe .   .  Go Live...
DCN:<[EMAIL PROTECTED]>Basics: ##.#.   ##.#.  Live Go...
  Live:   OO#.. Dead: OO#..  Playing
Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
/Software/Embedded Controllers)   .OO#.   .OO#.  rocks...2k
---



___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-13 Thread guitarlynn

On Saturday 13 April 2002 13:14, Mike Noyes wrote:

> Thanks. This works fairly well. I still get errors from tar, but I
> don't see any way to force it to ignore them.

Try:
> Examples:
> $ ./package-date.sh > test.txt 2>&1

To something like:

> #! /bin/bash
> find leaf/ -iname "*.lrp" |
> while read file ; do
>   echo `basename "$file"` $'\t' \
>   `tar tvzf "$file" 2>&1| awk '{print $4}' | sort -n | tail -n 1` 
$'\t' \
>   "$file";
> done |
> sort


> Now all I have to do is get the program name and version. Then
> determine the libc version with ldd.
>
> Jeff provided this snippet for checking the libc version with ldd.

I added a line to check for the version # to the script:


>   md ${package}
>   cd ${package}
>   gunzip ${packagelrppath}
>   ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin`
> \
>
> | grep -v ':$' | sort | uniq  
  awk '{print $1}' var/lib/lrpkg/${package}.version 

>   cd ..
>   rm -R ${package}
>
> I'll have to take a look at each package to determine program name
> and version.
>
> var/lib/lrpkg/package.help
> var/lib/lrpkg/package.version
>
> Any suggestions for accomplishing these tasks are appreciated.
>
> Thanks again for the help. :-)

-- 

~Lynn Avants
aka Guitarlynn

guitarlynn at users.sourceforge.net
http://leaf.sourceforge.net

If linux isn't the answer, you've probably got the wrong question!

___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-13 Thread Mike Noyes

On Sat, 2002-04-13 at 09:06, Brad Fritz wrote:
> 
> On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote:
> 
> > Anyone,
> > Is there a way to get tar to return the date of the most recent file in
> > a tarball?
> > 
> > Example:
> > $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp
> > -rwxr-xr-x root/root  9648 2001-12-17 06:42:08 usr/bin/cal
> > -rw-r--r-- root/root32 2001-12-17 06:42:21
> > var/lib/lrpkg/cal.list
> > 
> > Desired output: 2001-12-17
> 
> If you can't get tar to tell you directly,
> 
>   tar tvfz $TARBALL_FILE \
> | awk '{print $4}' \
> | sort -n \
> | tail -n 1
> 
> might work for you.

Brad,
Thanks. This works fairly well. I still get errors from tar, but I don't
see any way to force it to ignore them.

Examples:
$ ./package-date.sh > test.txt
tar: Archive contains future timestamp 2003-03-05 03:02:00
tar: Archive contains future timestamp 2003-03-03 15:12:22
tar: Archive contains future timestamp 2003-03-05 03:02:16
tar: Archive contains future timestamp 2003-03-03 13:47:49
tar: Archive contains future timestamp 2003-03-05 03:00:48
tar: Archive contains future timestamp 2003-03-05 03:00:30
tar: Archive contains future timestamp 2003-03-03 14:03:05
tar: Archive contains future timestamp 2003-03-03 14:03:02
tar: Archive contains future timestamp 2003-03-03 14:03:02
tar: Archive contains future timestamp 2003-03-03 14:03:05
tar: Archive contains future timestamp 2003-03-05 03:00:30
tar: Archive contains future timestamp 2003-03-05 03:00:48
tar: Archive contains future timestamp 2003-03-05 03:02:16
tar: Archive contains future timestamp 2003-03-05 03:02:00
gzip: stdin has more than one entry--rest ignored
tar: Child returned status 2
tar: Error exit delayed from previous errors
tar: Archive contains future timestamp 2021-02-15 20:53:31
tar: Archive contains future timestamp 2021-02-16 03:57:58

gzip: stdin: unexpected end of file
tar: Unexpected EOF in archive
tar: Error is not recoverable: exiting now
tar: Archive contains future timestamp 2021-03-01 21:58:48
tar: Archive contains future timestamp 2021-03-01 21:58:48
tar: Child died with signal 11
tar: Error exit delayed from previous errors


The current shell script is:

#! /bin/bash
find leaf/ -iname "*.lrp" |
while read file ; do
  echo `basename "$file"` $'\t' \
  `tar tvzf "$file" | awk '{print $4}' | sort -n | tail -n 1` $'\t' \
  "$file";
done |
sort

This provides a nice tab delimited text file, and gives me a commit
order. 
http://leaf.sourceforge.net/pub/packages/test.txt

Now all I have to do is get the program name and version. Then determine
the libc version with ldd.

Jeff provided this snippet for checking the libc version with ldd.

  md ${package} 
  cd ${package} 
  gunzip ${packagelrppath} 
  ldd `ls bin/* sbin/* usr/bin usr/sbin usr/local/bin usr/local/sbin` \ 
| grep -v ':$' | sort | uniq 
  cd .. 
  rm -R ${package}

I'll have to take a look at each package to determine program name and
version.

var/lib/lrpkg/package.help
var/lib/lrpkg/package.version

Any suggestions for accomplishing these tasks are appreciated.

Thanks again for the help. :-)


-- 
Mike Noyes <[EMAIL PROTECTED]>
http://sourceforge.net/users/mhnoyes/
http://leaf-project.org/


___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



Re: [Leaf-devel] Admin script help

2002-04-13 Thread Brad Fritz


On 13 Apr 2002 08:33:44 PDT Mike Noyes wrote:

> Anyone,
> Is there a way to get tar to return the date of the most recent file in
> a tarball?
> 
> Example:
> $ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp
> -rwxr-xr-x root/root  9648 2001-12-17 06:42:08 usr/bin/cal
> -rw-r--r-- root/root32 2001-12-17 06:42:21
> var/lib/lrpkg/cal.list
> 
> Desired output: 2001-12-17

If you can't get tar to tell you directly,

  tar tvfz $TARBALL_FILE \
| awk '{print $4}' \
| sort -n \
| tail -n 1

might work for you.

--Brad


___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel



[Leaf-devel] Admin script help

2002-04-13 Thread Mike Noyes

Anyone,
Is there a way to get tar to return the date of the most recent file in
a tarball?

Example:
$ tar tvzf leaf/devel/ddouthitt/packages/cal.lrp
-rwxr-xr-x root/root  9648 2001-12-17 06:42:08 usr/bin/cal
-rw-r--r-- root/root32 2001-12-17 06:42:21
var/lib/lrpkg/cal.list

Desired output: 2001-12-17

If possible, I'd like to use (find leaf/ -iname "*.lrp") in a loop
(for/while) of some kind.

I thought I would ask this time. I needlessly wasted five hours trying
to sort the packages-list.txt file manually. Charles provided this shell
script that performed the task in a few seconds.

#! /bin/bash
find leaf/ -iname "*.lrp" |
while read file ; do
echo `basename $file`" : $file";
done |
sort

I used the sed line below on the file after it was generated to create
the current pacakages-list.txt file.

$ sed -e 's/leaf\//http\:\/\/leaf-project\.org\//g' packages-list.txt >
packages.txt

-- 
Mike Noyes <[EMAIL PROTECTED]>
http://sourceforge.net/users/mhnoyes/
http://leaf-project.org/


___
Leaf-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-devel