[aur-general] script to check a binary package for architecture-independence
Here's a script to check the architecture-independence of a binary package. It only checks to see whether or not a tarball contains files that start with the ELF magic number, bytes 0x7f E L F. Maybe someone will find it useful. -- Chris
On 02/11/2009, Chris Brannon <cmbrannon79@gmail.com> wrote:
Here's a script to check the architecture-independence of a binary package. It only checks to see whether or not a tarball contains files that start with the ELF magic number, bytes 0x7f E L F. Maybe someone will find it useful. Here, where? :)
-- Andrea `bash` Scarpino Arch Linux Developer
Chris Brannon wrote:
Here's a script to check the architecture-independence of a binary package. It only checks to see whether or not a tarball contains files that start with the ELF magic number, bytes 0x7f E L F. Maybe someone will find it useful.
-- Chris
Hello There is no attach here. [1] But only doing this check (ELF signature) is just a necessary condition but not sufficient. [2] Should also check the machine (sufficient), because there are packages for example AVR and ARM that from point of view of -any are "architecture-independence". (some "crazy" :P packages have SPARC ELFs) [3] And also (I din't see the script, so i just suppose), you also need to exactarc archives files (.a) and analize the content of each object with [1] and [2] Good Luck! -- Gerardo Exequiel Pozzi ( djgera ) http://www.djgera.com.ar KeyID: 0x1B8C330D Key fingerprint = 0CAA D5D4 CD85 4434 A219 76ED 39AB 221B 1B8C 330D
Gerardo Exequiel Pozzi wrote:
Hello
There is no attach here.
The script is here: http://the-brannons.com/isanypkg The attachment must have been scrubbed. Plus, gmail doesn't give me copies of mail that I send to the list. Broken, broken gmail!
[2] Should also check the machine (sufficient), because there are packages for example AVR and ARM that from point of view of -any are "architecture-independence". (some "crazy" :P packages have SPARC ELFs) [3] And also (I din't see the script, so i just suppose), you also need to exactarc archives files (.a) and analize the content of each object
Thanks so much for your insight! Your guess was right; I forgot about members of ar archives. On second thought, I wonder if these sorts of checks should be done within namcap? -- Chris
On Mon, 02 Nov 2009 08:34:51 -0600, Chris Brannon <cmbrannon79@gmail.com> wrote:
Gerardo Exequiel Pozzi wrote: On second thought, I wonder if these sorts of checks should be done within namcap?
Good idea. Maybe its best to file a feature request and attach you script there. -- Pierre Schmitz, https://users.archlinux.de/~pierre
Chris Brannon schrieb:
Gerardo Exequiel Pozzi wrote:
Hello
There is no attach here.
The script is here: http://the-brannons.com/isanypkg The attachment must have been scrubbed. Plus, gmail doesn't give me copies of mail that I send to the list. Broken, broken gmail!
[2] Should also check the machine (sufficient), because there are packages for example AVR and ARM that from point of view of -any are "architecture-independence". (some "crazy" :P packages have SPARC ELFs) [3] And also (I din't see the script, so i just suppose), you also need to exactarc archives files (.a) and analize the content of each object
Thanks so much for your insight! Your guess was right; I forgot about members of ar archives.
On second thought, I wonder if these sorts of checks should be done within namcap?
They should. Two checks: 1) Is an arch=any package architecture-dependent -> error 2) Is an arch=whatever package architecture-independent -> warning If you know python and have the time, you should write a patch against namcap.git and mail it to Hugo. I told him once that it's a good feature, no idea if he got to it. You can check namcap.git to see if he did something, and check the bugtracker if there is a feature request already. Yay, I just looked at the script and it is in python already, so I guess a patch for namcap is in order :)
2009/11/2 Thomas Bächler <thomas@archlinux.org>:
Chris Brannon schrieb:
On second thought, I wonder if these sorts of checks should be done within namcap?
They should. Two checks: 1) Is an arch=any package architecture-dependent -> error 2) Is an arch=whatever package architecture-independent -> warning
If you know python and have the time, you should write a patch against namcap.git and mail it to Hugo. I told him once that it's a good feature, no idea if he got to it. You can check namcap.git to see if he did something, and check the bugtracker if there is a feature request already.
It's not in namcap.git. You could look at elfflies.py - that already checks for ELF files in the package. This would fit in neatly there. Abhishek
Chris Brannon wrote:
Here's a script to check the architecture-independence of a binary package. It only checks to see whether or not a tarball contains files that start with the ELF magic number, bytes 0x7f E L F. Maybe someone will find it useful.
-- Chris
Thanks Chris. However I think Gerardo has already written such a script, and the result is available on this page: http://wiki.archlinux.org/index.php/DeveloperWiki:Unimportant_Rebuild_List#P... (which also includes community) F
On Mon, Nov 2, 2009 at 09:48, Firmicus <Firmicus@gmx.net> wrote:
Thanks Chris. However I think Gerardo has already written such a script, I think he said he did it manually, or with a one-time bash hack
Daenyth Blank wrote:
On Mon, Nov 2, 2009 at 09:48, Firmicus <Firmicus@gmx.net> wrote:
Thanks Chris. However I think Gerardo has already written such a script,
I think he said he did it manually, or with a one-time bash hack
RIght, and I also wrote that the list on the wiki includes community, which is simply wrong. Sorry! So, yes Chris, your contribution is more than welcome! F
participants (8)
-
Abhishek Dasgupta
-
Andrea Scarpino
-
Chris Brannon
-
Daenyth Blank
-
Firmicus
-
Gerardo Exequiel Pozzi
-
Pierre Schmitz
-
Thomas Bächler