You are not logged in.

#101 2012-08-16 13:15:17

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

tomk wrote:

Would it kill you to write "that" instead of "dat"?

Online games can kill your orthography lol tongue

Offline

#102 2012-08-17 11:18:09

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:

EDIT: I have replaced the wget with curl, i can install packer and yaourt, but still fails to install pacaur with a new system (its a hidden option: number 3 in the aur-helper menu).

That might be because you forgot to install yajl, a dependency needed by cower (note also that wget isn't necessary here, and that you've set wrongly "AUR_HELPER" to packer).

                3)
                    if ! check_package "pacaur" ; then
                        package_install "base-devel wget curl expac"
                        aur_download_package "http://aur.archlinux.org/packages/cower/PKGBUILD"
                        aur_download_package "http://aur.archlinux.org/packages/pacaur/PKGBUILD"
                        if ! check_package "pacaur" ; then
                            echo "Pacaur not installed. EXIT now"
                            pause_function
                            exit 0
                        fi
                    fi
                    CURRENT_STATUS=1
                    AUR_HELPER="packer"
                    break
                    ;;

Edit: I've seen you're using makepkg -si in your aur build function, so adding yajl should probably not solve the issue here.

I haven't tried your script, but here's a few general comments:
- you could use curl everywhere instead of forcing the install of wget. Curl is installed as a dependecy of pacman 4 (pacman 3 used wget), so it is installed on every system. You can also remove curl from the "package_install" array for the same reason.
- instead of passing the PKGBUILD url to aur_download_package() function, why not using it as an array and pass the name of the aur pkgs only? That would shortens the code and make it clearer. Note you'll still have to download the tar.gz to avoid problem with package that provide install scripts, downloading the PKGBUILD only is not sufficient.
- It seems your script install the binary and aur dependencies as "explicit", which is a problem if the user wants to remove the package and its dependencies thereafter. You can use makepkg -si to install binary dependencies as "dependency", and/or use the pacman flag "pacman -D --asdep" to set them as dependency.

Last edited by Spyhawk (2012-08-17 11:25:45)

Offline

#103 2012-08-17 17:25:13

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

Spyhawk wrote:
helmuthdu wrote:

EDIT: I have replaced the wget with curl, i can install packer and yaourt, but still fails to install pacaur with a new system (its a hidden option: number 3 in the aur-helper menu).

That might be because you forgot to install yajl, a dependency needed by cower (note also that wget isn't necessary here, and that you've set wrongly "AUR_HELPER" to packer).

Edit: I've seen you're using makepkg -si in your aur build function, so adding yajl should probably not solve the issue here.

I haven't tried your script, but here's a few general comments:
- you could use curl everywhere instead of forcing the install of wget. Curl is installed as a dependecy of pacman 4 (pacman 3 used wget), so it is installed on every system. You can also remove curl from the "package_install" array for the same reason.
- instead of passing the PKGBUILD url to aur_download_package() function, why not using it as an array and pass the name of the aur pkgs only? That would shortens the code and make it clearer. Note you'll still have to download the tar.gz to avoid problem with package that provide install scripts, downloading the PKGBUILD only is not sufficient.
- It seems your script install the binary and aur dependencies as "explicit", which is a problem if the user wants to remove the package and its dependencies thereafter. You can use makepkg -si to install binary dependencies as "dependency", and/or use the pacman flag "pacman -D --asdep" to set them as dependency.

Fair enough, i have replaced all wget for curl in the script, no more need to install wget also.
I have changed the code to install packages from aur, i think by this way its possible to install packages without any aur-helper. All the packages will be stored in a folder inside the aui folder. Just pass then name of the package and its all done.

aui_install_package(){ #{{{
    for PACKAGE in $1; do
        #exec command as user instead of root
        su -l $USERNAME -c "
            [[ ! -d downloaded_packages ]] && mkdir downloaded_packages
            cd downloaded_packages
            curl -o $PACKAGE.tar.gz http://aur.archlinux.org/packages/$PACKAGE/$PACKAGE.tar.gz
            tar zxvf $PACKAGE.tar.gz
            rm $PACKAGE.tar.gz
            cd $PACKAGE
            makepkg -si --noconfirm
        "
    done
} #}}}

I have added the command "pacman -D --asdeps <package_name>" before install yaourt/packer/pacaur. It fails to install if i dont install they first.
Thx for the tips.

Greetings,
helmuthdu

EDIT1: I have added an new option to the aur-helpers, the "pacaui" (its just a name) it will download the packages base on the function above. So the user doesnt even need to install an aur-helper to install packages from aur.

EDIT2: That was an stupid idea* (it cant handle with dependencies from aur)

EDIT3: I have created a link for /usr/bin/core_perl/pod2man into /usr/bin then pacaur can be installed finally.

Last edited by helmuthdu (2012-08-17 21:22:41)

Offline

#104 2012-08-18 06:23:24

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [Script] Archlinux Ultimate Install Script

helmuthdu > Your code looks much better now. There's still a "AUR_HELPER="packer"" that should be changed (line 1036) if you want pacaur to work as expected.

Also, if you use "makepkg -si", you don't even need to install binary dependencies as those will be automatically installed by makepkg. You'll also have to use pacman -D --asdeps on aur dependencies, such as package-query and cower.
For example,

package_install "base-devel yajl namcap"
pacman -D --asdeps --noconfirm yajl namcap
aui_download_packages "package-query yaourt"

can become

package_install "base-devel"
aui_download_packages "package-query yaourt"
pacman -D --asdeps package-query

Same with packer and pacaur. You only need to keep base-devel (and probably git too).

Offline

#105 2012-08-18 16:33:52

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

Spyhawk wrote:

helmuthdu > Your code looks much better now. There's still a "AUR_HELPER="packer"" that should be changed (line 1036) if you want pacaur to work as expected.

Also, if you use "makepkg -si", you don't even need to install binary dependencies as those will be automatically installed by makepkg. You'll also have to use pacman -D --asdeps on aur dependencies, such as package-query and cower.

Same with packer and pacaur. You only need to keep base-devel (and probably git too).


Thx for the tips, fixed all.
I would do that, but again, it fails to compile (at least packer and yaourt) if i dont install those dependecies first.

Best regards,
helmuthdu

Offline

#106 2012-08-19 07:47:08

Spyhawk
Member
Registered: 2006-07-07
Posts: 485

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:

Thx for the tips, fixed all.
I would do that, but again, it fails to compile (at least packer and yaourt) if i dont install those dependecies first.

This is weird. I just tried manually with package-query/yaourt and packer, and this works as expected. In fact, this is exactly how pacaur is working - by letting makepkg doing all the work. Maybe pacman database isn't refreshed at that time?

Also, looking at this commit, I can see two little mistake:
- typo in AUR_HELPER="pacaui"
- "pacman -D --asdeps --noconfirm cower" defined before installing cower (also, you don't need the "--noconfirm" option when used with -D)

Keep up the good work, your script is very handy to save time.

Offline

#107 2012-08-22 05:19:26

vlatko27
Member
Registered: 2012-08-18
Posts: 10

Re: [Script] Archlinux Ultimate Install Script

just a week ago i installed arch with this script....awesome work. fast and easy, almost as easy as installing ubuntu. thank you. wink

Offline

#108 2012-08-23 04:38:00

RockrKnight
Member
Registered: 2011-06-03
Posts: 10

Re: [Script] Archlinux Ultimate Install Script

In KDE, after installation the volume icon is missing. That is because kdemultimedia-kmix is not installed. Simple.
Thanks.

Offline

#109 2012-08-29 21:26:35

quiliro
Member
Registered: 2012-08-29
Posts: 1

Re: [Script] Archlinux Ultimate Install Script

Nice script. Thank you.

I am trying to modify it to work in ParabolaGNU and to include only free (as in freedom) packages. ParabolaGNU is an FSF aproved distro based on Arch. For such purposes the script will install packages only from ParabolaGNU repos.

Last edited by quiliro (2012-08-29 21:28:56)

Offline

#110 2012-08-29 21:32:57

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 102
Website

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:

The script is PURE systemd now. Dropped support for initscripts.
It will configure all options using systemd from now on.
You can run the script again to get a pure systemd system.
Here is one list with the improvements from the sysvinit to systemd.
http://worldofgnome.org/arch-migrates-t … e-support/

Cheers,
Helmuth

Thanks Helmuth
Just did a new install, it makes my box boot faster than ever!


Sergio S.

Offline

#111 2012-08-30 16:12:33

theshadster
Member
Registered: 2012-08-06
Posts: 29

Re: [Script] Archlinux Ultimate Install Script

A small query... in your package_remove function:

package_remove(){ #{{{
    #remove package
    if [[ $AUTOMATIC_MODE -eq 1 ]]; then
        pacman -Rcsn --noconfirm $1
    else
        pacman -Rcsn $1
    fi
} #}}}

you use "pacman -Rcsn". From the pacman man page:

-c, --cascade
           Remove all target packages, as well as all packages that depend on one or more target packages. This
           operation is recursive, and must be used with care since it can remove many potentially needed
           packages.

and

-s, --recursive
           Remove each target specified including all of their dependencies, provided that (A) they are not
           required by other packages; and (B) they were not explicitly installed by the user. This operation is
           recursive and analogous to a backwards --sync operation, and helps keep a clean system without orphans.
           If you want to omit condition (B), pass this option twice.

My query being the use of the 'c' option. Would not 'pacman -Rssn'  be a safer alternative ?

Offline

#112 2012-08-30 17:11:15

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

theshadster wrote:

A small query... in your package_remove function:
My query being the use of the 'c' option. Would not 'pacman -Rssn'  be a safer alternative ?

I never thought about it, i just followed the arch-wiki [https://wiki.archlinux.org/index.php/Pa … g_packages] command to remove all packages and all dependencies.

Offline

#113 2012-08-30 17:40:03

ASHASHIN
Member
Registered: 2012-08-20
Posts: 5

Re: [Script] Archlinux Ultimate Install Script

Great script, made my last installation much faster. big_smile

Is there any chance for you to add XMonad to your script?

Offline

#114 2012-08-30 17:40:09

theshadster
Member
Registered: 2012-08-06
Posts: 29

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:
theshadster wrote:

A small query... in your package_remove function:
My query being the use of the 'c' option. Would not 'pacman -Rssn'  be a safer alternative ?

I never thought about it, i just followed the arch-wiki [https://wiki.archlinux.org/index.php/Pa … g_packages] command to remove all packages and all dependencies.

I see - but that one comes with a warning wink

A very nice script, though. smile

Offline

#115 2012-08-31 13:21:42

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

ASHASHIN wrote:

Great script, made my last installation much faster. big_smile

Is there any chance for you to add XMonad to your script?

I have added the Awesome as Desktop Environment [https://wiki.archlinux.org/index.php/Awesome]...
i think that can do this tricks (but i didnt have tried, i'm still in love with gnome big_smile)

Offline

#116 2012-09-01 11:32:08

ASHASHIN
Member
Registered: 2012-08-20
Posts: 5

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:
ASHASHIN wrote:

Great script, made my last installation much faster. big_smile

Is there any chance for you to add XMonad to your script?

I have added the Awesome as Desktop Environment [https://wiki.archlinux.org/index.php/Awesome]...
i think that can do this tricks (but i didnt have tried, i'm still in love with gnome big_smile)

Actually awesome, XMonad and Openbox are Window managers not desktop environments (just a little thing you may want to correct in future versions of your script).
The point on me requesting XMonad comes from the language it is writen (Haskell), i'm gonna use it to encourage the 1st year students that think haskell is useless.

Last edited by ASHASHIN (2012-09-01 11:41:17)

Offline

#117 2012-09-03 13:32:51

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

ASHASHIN wrote:

Actually awesome, XMonad and Openbox are Window managers not desktop environments (just a little thing you may want to correct in future versions of your script).
The point on me requesting XMonad comes from the language it is writen (Haskell), i'm gonna use it to encourage the 1st year students that think haskell is useless.

Fixed, i think thats a common mistake...
Yeah, haskell is a great language, i had some classes about it at college smile

Offline

#118 2012-09-06 17:27:25

jean_no
Member
Registered: 2007-09-18
Posts: 48

Re: [Script] Archlinux Ultimate Install Script

Hi

I found a small bug in the function remove_partition(), line 351 :
My hard drive has 15 partitions ( yes 15 ) and when I want to format it, here's what I get :

Select root partition:

1) /dev/sda1     4) /dev/sda4    7) /dev/sda7   10) /dev/sda10  13) /dev/sda13
2) /dev/sda2     5) /dev/sda5    8) /dev/sda8   11) /dev/sda11  14) /dev/sda14
3) /dev/sda3     6) /dev/sda6    9) /dev/sda9   12) /dev/sda12  15) /dev/sda15
Enter your option: 1
Confirm format /dev/sda1 partition [y/N]: y

Select filesystem:

1) ext4      3) btrfs     5) ntfs
2) ext3      4) vfat
Enter your option: 1

...

Select swap partition:

1) /dev/sda2    4) /dev/sda5   7) /dev/sda8  10) 1          13) 4
2) /dev/sda3    5) /dev/sda6   8) /dev/sda9  11) 2          14) 5
3) /dev/sda4    6) /dev/sda7   9) 0          12) 3
Enter your option:

as you can see, all occurrences of "sda1" has been deleted.

A very nice script, though.

Offline

#119 2012-09-07 02:49:56

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

jean_no wrote:

Hi

I found a small bug in the function remove_partition(), line 351 :
My hard drive has 15 partitions ( yes 15 ) and when I want to format it, here's what I get :

Select root partition:

1) /dev/sda1     4) /dev/sda4    7) /dev/sda7   10) /dev/sda10  13) /dev/sda13
2) /dev/sda2     5) /dev/sda5    8) /dev/sda8   11) /dev/sda11  14) /dev/sda14
3) /dev/sda3     6) /dev/sda6    9) /dev/sda9   12) /dev/sda12  15) /dev/sda15
Enter your option: 1
Confirm format /dev/sda1 partition [y/N]: y

Select filesystem:

1) ext4      3) btrfs     5) ntfs
2) ext3      4) vfat
Enter your option: 1

...

Select swap partition:

1) /dev/sda2    4) /dev/sda5   7) /dev/sda8  10) 1          13) 4
2) /dev/sda3    5) /dev/sda6   8) /dev/sda9  11) 2          14) 5
3) /dev/sda4    6) /dev/sda7   9) 0          12) 3
Enter your option:

as you can see, all occurrences of "sda1" has been deleted.

A very nice script, though.

Jesus, you realy like partitions! lol
I will check this and fix later, thanks for the bug report smile

EDIT: Fixed with last commit

Last edited by helmuthdu (2012-09-08 11:32:28)

Offline

#120 2012-09-08 03:48:41

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 102
Website

Re: [Script] Archlinux Ultimate Install Script

Error when trying to install boot loader on another partition (not MBR)

With GRUB; When issuing this command: chattr -i /boot/grub/i386-pc/core.img,  the "/i36-pc/core.img" is nonexistent, so the script wont work correctly and it wont boot later, just works with GRUB on MBR.

Also if I opt for "syslinux" is defaults to MBR (no option to install on another partition)

Thanks again for your work!


Sergio S.

Offline

#121 2012-09-08 11:40:15

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

spsf64 wrote:

Error when trying to install boot loader on another partition (not MBR)

With GRUB; When issuing this command: chattr -i /boot/grub/i386-pc/core.img,  the "/i36-pc/core.img" is nonexistent, so the script wont work correctly and it wont boot later, just works with GRUB on MBR.

Also if I opt for "syslinux" is defaults to MBR (no option to install on another partition)

Thanks again for your work!

Hi,

i found this issue in Grub2 wiki:

Install to Partition or Partitionless Disk
Note: grub-bios (any version - including upstream Bazaar repo) does not encourage installation to a partition boot sector or a partitionless disk like GRUB Legacy or Syslinux does. This kind of setup is prone to breakage, especially during updates, and is not supported by Arch devs.

I will do some tests with a virtualbox and see what i can do smile

EDIT: You can install syslinux and remove the "m" from the command like:

syslinux-install_update -ia

That should do the trick.
more info: https://wiki.archlinux.org/index.php/Sy … ic_Install

Last edited by helmuthdu (2012-09-08 12:17:18)

Offline

#122 2012-09-09 13:39:58

spsf64
Member
From: FL, US or SP, BR
Registered: 2012-05-18
Posts: 102
Website

Re: [Script] Archlinux Ultimate Install Script

helmuthdu wrote:
spsf64 wrote:

Error when trying to install boot loader on another partition (not MBR)

With GRUB; When issuing this command: chattr -i /boot/grub/i386-pc/core.img,  the "/i36-pc/core.img" is nonexistent, so the script wont work correctly and it wont boot later, just works with GRUB on MBR.

Also if I opt for "syslinux" is defaults to MBR (no option to install on another partition)

Thanks again for your work!

Hi,

i found this issue in Grub2 wiki:

Install to Partition or Partitionless Disk
Note: grub-bios (any version - including upstream Bazaar repo) does not encourage installation to a partition boot sector or a partitionless disk like GRUB Legacy or Syslinux does. This kind of setup is prone to breakage, especially during updates, and is not supported by Arch devs.

I will do some tests with a virtualbox and see what i can do smile

EDIT: You can install syslinux and remove the "m" from the command like:

syslinux-install_update -ia

That should do the trick.
more info: https://wiki.archlinux.org/index.php/Sy … ic_Install

Thank you, hope you can fix these issues in a new release of your script


Sergio S.

Offline

#123 2012-09-17 11:39:37

Heema
Member
From: Egypt
Registered: 2008-08-12
Posts: 62

Re: [Script] Archlinux Ultimate Install Script

Great script, tried the new ais out in virtualbox and it worked great

i just had a few notes when testing it out:

- line:339    could add ext2 as its used for the boot partition
- line:465    after generating fstab data=ordered could be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.
                 https://wiki.archlinux.org/index.php/Be … e_an_fstab
- line:590    Warning: Editing file /boot/grub/grub.cfg is strongly not recommended. The file is generated by the grub-mkconfig command, and it is best to edit your /etc/default/grub or one of the scripts in the /etc/grub.d folder.
                 https://wiki.archlinux.org/index.php/GRUB

                 and maybe add another option for dual-booting
                 https://wiki.archlinux.org/index.php/GRUB#Dual-booting

Offline

#124 2012-09-17 13:07:51

helmuthdu
Member
Registered: 2011-11-09
Posts: 85

Re: [Script] Archlinux Ultimate Install Script

Heema wrote:

Great script, tried the new ais out in virtualbox and it worked great

i just had a few notes when testing it out:

- line:339    could add ext2 as its used for the boot partition
- line:465    after generating fstab data=ordered could be removed. This option will be used automatically whether you specify it or not. No point cluttering up your fstab.
                 https://wiki.archlinux.org/index.php/Be … e_an_fstab
- line:590    Warning: Editing file /boot/grub/grub.cfg is strongly not recommended. The file is generated by the grub-mkconfig command, and it is best to edit your /etc/default/grub or one of the scripts in the /etc/grub.d folder.
                 https://wiki.archlinux.org/index.php/GRUB

                 and maybe add another option for dual-booting
                 https://wiki.archlinux.org/index.php/GRUB#Dual-booting

Thx smile

I agree with the most of these things, but just the fstab, since the fstab is configurated by the "genfstab" script from the archlinux install scripts, i will not change any value added to it. Maybe you can report this at https://github.com/falconindy/arch-install-scripts.

Greetings,
helmuthdu

Last edited by helmuthdu (2012-09-18 01:47:39)

Offline

#125 2012-09-18 19:46:34

alexjax
Member
From: UK
Registered: 2012-09-17
Posts: 9

Re: [Script] Archlinux Ultimate Install Script

hay thanks for this! love yah. x

1) got a few errors swapoff: /dev/sda2/:  swapoff failed: Invalid argument error when i selected yes to format the swap as ext2 using ais mode.

2) in default script i get a root warning (please use the --asroot option) etc when running makepkg i am logged in as root as you request in your fist post.

perhaps you can add the --asroot to the script or you can make this a manual command, you could even do a check for the app at the end and provide an option to try again manually if it's not found?

with error 2 there i get kicked out the script sadly. ;(

thanks again. x

Last edited by alexjax (2012-09-18 21:10:02)


CPU: AMD Bulldozer FX-8 8120 3.1Ghz | MOBO: Gigabyte GA-990FXA-UD3 | Ram: Corsair 12GB 1866Mhz Red Vengence | GPU: Palit Jetstream GTX 670 2GB | PSU: Corsair Hx1050 | Cooling: Corsair H100 | Case: Corsair 800D | HDD: Boot HDD OCZ 120GB SSD etc

Offline

Board footer

Powered by FluxBB