Re: [arch-general] [PATCH] gdisk patches
On Sat, 17 Jul 2010, Ionuț Bîru wrote: On 07/17/2010 01:23 AM, Mark Pustjens wrote: On Fri, 16 Jul 2010, Ionuț Bîru wrote: On 07/16/2010 10:11 PM, Mark Pustjens wrote: Hi List, Below a patch wich fixes two bugs in the gdisk package. They have been submitted uptream but not yet been accepted. then we don't need them if upstream did that They didn't do anything :) Submitted only a few hours ago. post a link to the bug report or mailing list so we can follow the progress As i said in my original post: there is no place for a bug report, nor is there a mailing list. -- Ionuț Greetings/Groetjes Mark Pustjens -- 'It's a lovely morning, lads,' he said. 'I feel like a million dollars. Don't you?' There was a murmur of reluctant agreement. 'Good,' said Cohen. 'Let's go and get some.' (Interesting Times)
[arch-general] [PATCH] gdisk patches
Hi List, Below a patch wich fixes two bugs in the gdisk package. They have been submitted uptream but not yet been accepted. The first bug fixed is that partition attributes are read/stored backwards. The second bug fixed is that when changing an undefined attribute no longer junk is displayed. I'm not sure if this is the right place, but i sent to this list mainly because there is no official gpt fdisk list afai could find. Now this patch has a place on the net. Cheers! Greetings/Groetjes Mark Pustjens -- diff --git a/extra/gdisk/PKGBUILD b/extra/gdisk/PKGBUILD index 0664a57..af9b44e 100644 --- a/extra/gdisk/PKGBUILD +++ b/extra/gdisk/PKGBUILD @@ -9,10 +9,12 @@ arch=('i686' 'x86_64') url=http://www.rodsbooks.com/gdisk; depends=('gcc-libs' 'util-linux-ng' 'popt') license=('GPL2') -source=(http://www.rodsbooks.com/gdisk/gdisk-$pkgver.tgz) +source=(http://www.rodsbooks.com/gdisk/gdisk-$pkgver.tgz + gdisk_attributes.patch) build() { cd $srcdir/$pkgname-$pkgver + patch -p1 -i $srcdir/gdisk_attributes.patch make install -D -m755 gdisk $pkgdir/sbin/gdisk install -D -m755 sgdisk $pkgdir/sbin/sgdisk @@ -23,4 +25,6 @@ build() { install -D -m644 README $pkgdir/usr/share/gdisk/README install -D -m644 NEWS pkgdir/usr/share/gdisk/NEWS } -md5sums=('48740d8de518f79ae9dae7ec58068d05') + +md5sums=('48740d8de518f79ae9dae7ec58068d05' + '106a4186587ab572f6397ba1702e8d47') diff --git a/extra/gdisk/gdisk_attributes.patch b/extra/gdisk/gdisk_attributes.patch new file mode 100644 index 000..e03c957 --- /dev/null +++ b/extra/gdisk/gdisk_attributes.patch @@ -0,0 +1,29 @@ +diff --git a/attributes.cc b/attributes.cc +index 527dc87..a7b2afd 100644 +--- a/attributes.cc b/attributes.cc +@@ -26,6 +26,7 @@ Attributes::Attributes(void) { +// Most bits are undefined, so start by giving them an +// appropriate name +for (i = 1; i NUM_ATR; i++) { ++ temp.str(); // empty stream + temp Undefined bit # i; + atNames[i] = temp.str(); +} // for +@@ -75,12 +76,12 @@ void Attributes::ChangeAttributes(void) { +do { + response = GetNumber(0, 64, -1, (string) Toggle which attribute field (0-63, 64 to exit): ); + if (response != 64) { +- bitValue = PowerOf2(uint32_t (NUM_ATR - response - 1)); // Find the integer value of the bit +- if ((bitValue attributes) == bitValue) { // bit is set +-attributes -= bitValue; // so unset it ++ bitValue = 1 response; ++ if (bitValue attributes) { // bit is set ++attributes = ~bitValue; // so unset it + cout Have disabled the ' atNames[response] ' attribute.\n; + } else { // bit is not set +-attributes += bitValue; // so set it ++attributes |= bitValue; // so set it + cout Have enabled the ' atNames[response] ' attribute.\n; + } // if/else + } // if
Re: [arch-general] [PATCH] gdisk patches
On Fri, 16 Jul 2010, Ionuț Bîru wrote: On 07/16/2010 10:11 PM, Mark Pustjens wrote: Hi List, Below a patch wich fixes two bugs in the gdisk package. They have been submitted uptream but not yet been accepted. then we don't need them if upstream did that They didn't do anything :) Submitted only a few hours ago. -- Ionuț Greetings/Groetjes Mark Pustjens -- He microwaved himself something called a Pour-On Genuine Creole Lasagne, which said it served four portions. It did if you were dwarfs. (Only You Can Save Mankind)
[arch-general] [Tool] rebuildorder.py: determines rebuild order of a list of packages.
Hi List, Based on the rebuildorder script by Allen McRae (1) I've written a script which determines, given a list of packages, the order in which they should be built. A package x that depend on package y is always below y on the list, for any package y x depends on. This script can also include the makedeps of a package in the list. That is, if a package x has a makedepend on y, y is added to the list as well, before x and after any dependencies it may have. When you find a bug, let me know. Have fun with it. Greetings/Groetjes Mark Pustjens (1) http://allanmcrae.com/scripts/rebuildorder
[arch-general] [patch] AIF, discover repos on iso.
Hi List, The attached patch fixes a TODO in lib-pacman of aif. Instead of hardcoding that `core' is always available locally and falling back to net for others, it now checks /src/ for repos. It assumes repos are stored at /src/$repo/pkg/. All these repos are added as cache dirs. While preparing pacman, a number of repo names are provided to be prepared. All those repos which were requested are added as actual repo. If this repo is available locally, the url points to disk. Otherwise it falls back to the mirrorlist. Please let me know what you think. Greetings/Groetjes Mark Pustjens -- Currently there's five machines permanently networked here. They *all* contain the serious core stuff. A couple of the machines are pensioned off 486s, with little other value now. Plus there's two Jaz drives in the building and the portable also carries a fair amount of stuff. Plus every Friday a man comes around and carves all the new stuff onto stone slabs and buries them in the garden... I think I'm okay. (alt.fan.pratchett)diff -u -Naur aif-2009.08.07/src/core/libs/lib-pacman.sh aif-2009.08.07-new/src/core/libs/lib-pacman.sh --- aif-2009.08.07/src/core/libs/lib-pacman.sh 2009-08-07 21:25:04.0 +0200 +++ aif-2009.08.07-new/src/core/libs/lib-pacman.sh 2010-02-19 22:12:33.0 +0100 @@ -62,25 +62,34 @@ [ $var_PKG_SOURCE_TYPE = cd ] local serverurl=${var_FILE_URL} [ $var_PKG_SOURCE_TYPE = net ] local serverurl=${var_SYNC_URL} - [ -z $1 ] repos=core - [ -n $1 ] repos=$@ - # Setup a pacman.conf in /tmp - cat EOF /tmp/pacman.conf -[options] -CacheDir = ${var_TARGET_DIR}/var/cache/pacman/pkg -CacheDir = /src/core/pkg -EOF - -for repo in $repos -do - #TODO: this is a VERY, VERY dirty hack. we fall back to net for any non-core repo because we only have core on the CD. also user maybe didn't pick a mirror yet - if [ $repo != core ] - then - add_pacman_repo target ${repo} Include = $var_MIRRORLIST + if [ -z $1 ]; then + repos=core else - add_pacman_repo target ${repo} Server = ${serverurl/\$repo/$repo} # replace literal '$repo' in the serverurl string by $repo where $repo is our variable. + repos=$@ fi -done + + # We make the assumption that /src/ contains a number of directories, each + # of which contains a package repository under subdir `pkg'. + # Eg: /src/core/pkg is a package repository. + local_repos=`ls /src/` + + # Setup a pacman.conf in /tmp + echo [options] /tmp/pacman.conf + echo CacheDir = ${var_TARGET_DIR}/var/cache/pacman/pkg /tmp/pacman.conf + for repo in ${local_repos}; do + echo CacheDir = /src/${repo}/pkg /tmp/pacman.conf + done + + # Add each repo to the config file + # If the repo is available locally, add a local url, otherwise refer to the mirrorlist. + for repo in ${repos}; do + if echo ${local_repos} | grep ^${repo}$ /dev/null ;then + add_pacman_repo target ${repo} Server = file:///src/${repo}/pkg + else + add_pacman_repo target ${repo} Include = ${var_MIRRORLIST} + fi + done + # Set up the necessary directories for pacman use [ ! -d ${var_TARGET_DIR}/var/cache/pacman/pkg ] mkdir -m 755 -p ${var_TARGET_DIR}/var/cache/pacman/pkg [ ! -d ${var_TARGET_DIR}/var/lib/pacman ] mkdir -m 755 -p ${var_TARGET_DIR}/var/lib/pacman
[arch-general] [patch] AIF, partition table compatibility with grub2.
Hi list, The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases. Please let me know what you think. Greetings/Groetjes Mark Pustjens -- I do note with interest that old women in my books become young women on the covers... this is discrimination against the chronologically gifted. (alt.fan.pratchett)--- usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh 2009-08-07 21:25:04.0 +0200 +++ /home/unknown/Documents/lightarch/image-build/overlay/usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh 2009-12-08 13:00:46.0 +0100 @@ -368,7 +366,7 @@ # invoke sfdisk debug 'FS' Partition calls: sfdisk $DEVICE -uM $LOG 21 $sfdisk_input printk off - sfdisk $DEVICE -uM $LOG 21 EOF + sfdisk -D $DEVICE -uM $LOG 21 EOF $sfdisk_input EOF if [ $? -gt 0 ]; then
Re: [arch-general] [patch] AIF, partition table compatibility with grub2.
On Tue, 9 Feb 2010, Dieter Plaetinck wrote: On Tue, 9 Feb 2010 20:26:45 +0100 (CET) Mark Pustjens pustj...@dds.nl wrote: Hi list, The attatched patch adds the `-D' option to the sfdisk call. This causes some extra space to be saved for the MBR, which is needed for grub2 in some cases. Please let me know what you think. Greetings/Groetjes Mark Pustjens Hi! man sfdisk: -D or --DOS For DOS-compatibility: waste a little space. (More precisely: if a partition cannot contain sector 0, e.g. because that is the MBR of the device, or contains the partition table of an extended partition, then sfdisk would make it start the next sector. However, when this option is given it skips to the start of the next track, wasting for example 33 sectors (in case of 34 sectors/track), just like certain versions of DOS do.) Certain Disk Managers and boot loaders (such as OSBS, but not LILO or the OS/2 Boot Manager) also live in this empty space, so maybe you want this option if you use one. I don't really see the point. this wastes some disk space to be compatible with old, past-legacy bootloaders and OS'es. why exactly would we want this? some cases ? The disc space wasted is about 32K, not realy something to be sad about. I used the term `some cases', as I do not know what cases these are exactly. I have only encountered one so far. I was installing arch in a VirtualBox machine. Then I wanted to install grub2 (and grub2-gfx). They complained they could not install properly, unless I chose to use (depreciated) so-called `block lists'. As it turns out, in my case the part of the bootloader which is normally installed in the MBR was too big. Using the -D flag of sfdisk a little extra space was left so this part of the bootloader did fit. As you can understand, grub2 cannot be called legacy. Dieter Greetings/Groetjes Mark Pustjens