Obtain pacman --nosave option in PKGBUILD install script
Can I get to the --nosave option in the install script of a PKGBUILD? Rather than tell users how to fully uninstall a package I'd like to make the install script do it. If they don't specify --nosave then I leave a few things they might want for a reinstall. If they specify --nosave then I delete everything.
I don't see it where it needs to be on pre_remove and post_remove.
They will use pacman and it's not hidden in the install script. It's quite normal for install scripts of big packages to delete files. What I want is for the install script to delete more files if they use
pacman -R --nosave mypackage
This means that the user is not going to use mypackage any more and wants all the slop removed, often because they think the config is broken and a brand new config might fix it.
The problem is that PKGBUILD backup=() is so horribly implemented that I tend to avoid it. backup=() works fine on upgrade but is borked for remove/reinstall. I can't have users chasing down pacsave files because they had to temporarily remove a package. I need to be able to remove/reinstall packages with or without alterations to the configuration, as specified by the user. The only way I can get config files to be managed correctly is to keep them out of the package and out of the backup array. I delete them in the install script when the conditions are right. The backup array isn't the least bit capable of handling config folders, temp folders, log folders, database entries, and other stuff found in big packages.
Without some help in the install file it's either slop or scorched earth--and the PKGBUILD-er makes the decision.
There aren't many packages that need this so for now I just put cleanup instructions in the PKGBUILD.
Similar Messages
-
[SOLVED] Pacman 3.5.1 and install script problem.
Hi, i'm currently maintaining dkms-nvidia package in AUR. After upgrading to pacman 3.5.1 install script doesn't work anymore. I have searched forum and some googled but i haven't got a clue. It was working with pacman 3.4.3 (i have skipped 3.5.0 release). Does something changed with 3.5.x release about install script handling? Here is the install script:
http://pastebin.com/Lpehuabk
Last edited by tarakbumba (2011-04-06 07:18:16)I have found the problem, i think. When i extracted my compiled dkms-nvidia package i get :
02:35 atilla@tarakbumba:~/DEPOM/Archlinux/Paketler/dkms-nvidia-270.30-3-x86_64.pkg$ ls -lah
toplam 24K
drwxr-xr-x 4 atilla users 4,0K Mar 30 02:35 .
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:35 ..
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:34 etc
-rw-r--r-- 1 atilla users 1,2K Mar 30 02:34 .iNSTALL
-rw-r--r-- 1 atilla users 1,7K Mar 30 02:34 .PKGINFO
drwxr-xr-x 3 atilla users 4,0K Mar 30 02:34 usr
See the ".iNSTALL"? But when it comes to pacman package file is ".INSTALL". Also namcap throws a warning:
02:41 atilla@tarakbumba:~/DEPOM/Archlinux/Paketler$ namcap dkms-nvidia-270.30-3-x86_64.pkg.tar.xz
dkms-nvidia W: Dependency included and not needed ('dkms')
dkms-nvidia E: Missing custom license directory (usr/share/licenses/dkms-nvidia)
dkms-nvidia W: File (.iNSTALL) exists in a non-standard directory.
dkms-nvidia W: File (usr/src) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/xapi-sdk.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/cpuopsys.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nvtypes.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-i2c.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/README.template) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/os-registry.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-memdbg.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv_gvi.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/os-agp.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/os-agp.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nvacpi.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/rmretval.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/conftest.sh) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-cray.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/gcc-version-check.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-reg.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/os-interface.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/dkms.conf) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/g_nvreadme.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-linux.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-vm.c) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/rmil.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-misc.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/makefile) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/Makefile.kbuild) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/os-interface.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-vm.h) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/Makefile.nvidia) exists in a non-standard directory.
dkms-nvidia W: File (usr/src/nvidia-270.30/nv-kernel.o) exists in a non-standard directory.
dkms-nvidia E: ELF file ('usr/src/nvidia-270.30/nv-kernel.o') outside of a valid path.
See "dkms-nvidia W: File (.iNSTALL) exists in a non-standard directory." ?
My older packges also have ".iNSTALL" but pacman-3.4.3 was taking care of it. Now it ignores install scriplets like these. It is either a makepkg bug or pacman bug. Any help or should i open a bug report?
Last edited by tarakbumba (2011-03-29 23:45:26) -
[SOLVED] pacman log optional dependencies
Hi,
Coming from ubuntu, just been trying Arch to get to know better the linux system and try a more KISS approach. I really like it, however I had a few troubles on the way which I am resolving slowly.. however concrenng pacman, maybe I am blind but I can't find a way to get all the messages displayed during some package installation in the pacman.log ; in particular all the optional dependencies are not listed there..
Is there a way to get the full pacman log as shown during the installation in a log file ?
Last edited by Alain2 (2009-11-08 02:05:52)Hi All,
I saw this and had to take up the challenge.
How's this? It's pure sed at work. It shows both required and optional dependencies.
pacman -Qi | sed -n '/^Name/,/^Required By/{ /^Version/,/^Provides/d; /^Required By/d; /^Name/{x;p;x}; p }'
This is a command line version of course so just make an alias for it in .bashrc. If you want to log it then create a cron script to update it. By the way this should alleviate the multi-line issue you were having as I did some reverse thinking on this. I just eliminated what we didn't need as opposed to just trying to find what we did need. Sometimes that works better.
Here's an example output: (The actual output is nice and tidy. Pasting into the forum here mucked the alignment up. ) lol!
Name : pcmciautils
Depends On : glibc sysfsutils module-init-tools>=3.2pre9
Optional Deps : None
Name : pcre
Depends On : gcc-libs
Optional Deps : None
Name : perl
perl-archive-tar=1.52 perl-autodie=2.06_01
perl-attribute-handlers=0.85 perl-autoloader=5.68
perl-b-debug=1.11 perl-b-lint=1.11 perl-base=2.14
perl-bignum=0.23 perl-cgi=3.43 perl-class-isa=0.33
perl-compress-raw-bzib2=2.020 perl-compress-raw-zlib=2.020
perl-constant=1.17 perl-cpan=1.9402 perl-cpanplus=0.88
perl-db_file=1.820 perl-dprof=20080331.00
perl-data-dumper=2.124 perl-devel-ppport=3.19
perl-devel-peek=1.04 perl-digest=1.16 perl-digest-md5=2.39
perl-digest-sha=5.47 perl-encode=2.35
perl-encoding-warnings=0.11 perl-exporter=5.63
perl-extutils-cbuilder=0.2602 perl-extutils-command=1.16
perl-extutils-constant=0.22 perl-extutils-embed=1.28
perl-extutils-install=1.54 perl-extutils-makemaker=6.55_02
perl-extutils-manifest=1.56 perl-extutils-parsexs=2.2002
perl-file-fetch=0.20 perl-file-path=2.07_03
perl-file-temp=0.22 perl-filter=1.37
perl-filter-simple=0.84 perl-getopt-long=2.38 perl-if=0.05
perl-io=1.25 perl-io-compress=2.020 perl-io-zlib=1.09
perl-ipc-cmd=0.46 perl-ipc-sysv=2.01 perl-libnet=1.22
perl-locale-codes=2.07 perl-locale-maketext=0.13
perl-locale-maketext-simple=0.18 perl-log-message=0.02
perl-log-message-simple=0.04 perl-mime-base64=3.08
perl-math-bigint=1.89 perl-math-bigint-fastcalc=0.19
perl-math-bigrat=0.22 perl-math-complex=1.56
perl-memoize=1.01_03 perl-module-build=0.340201
perl-module-corelist=2.18 perl-module-load=0.16
perl-module-load-conditional=0.30 perl-module-loaded=0.02
perl-module-pluggable=3.9 perl-next=0.64 perl-net-ping=2.36
perl-object-accessor=0.34 perl-package-constants=0.02
perl-params-check=0.26 perl-parent=0.221
perl-parse-cpan-meta=1.39 perl-pathtools=3.30
perl-pod-escapes=1.04 perl-pod-latex=0.58
perl-pod-parser=1.37 perl-pod-perldoc=3.14_04
perl-pod-simple=3.07 perl-podlators=2.2.2 perl-safe=2.18
perl-scalar-list-utils=1.21 perl-selfloader=1.17
perl-shell=0.72_01 perl-storable=2.20 perl-switch=2.14
perl-sys-syslog=0.27 perl-term-cap=1.12 perl-term-ui=0.20
perl-test=1.25_02 perl-test-harness=3.17
perl-test-simple=0.92 perl-text-balanced=2.0.0
perl-text-parsewords=3.27 perl-text-soundex=3.03
perl-text-tabs+wraps=2009.0305 perl-thread-queue=2.11
perl-thread-semaphore=2.09 perl-threads=1.72
perl-threads-shared=1.29 perl-tie-file=0.97_02
perl-tie-refhash=1.38 perl-time-hires=1.9719
perl-time-local=1.1901 perl-time-piece=1.15
perl-unicode-collate=0.52 perl-unicode-normalize=1.03
perl-version=0.77 perl-win32=0.39 perl-win32api-file=0.1101
perl-xsloader=0.10 perlio-via-quotedprint=0.06
Depends On : gdbm db>=4.8 coreutils glibc sh
Optional Deps : None
Name : perl-crypt-ssleay
Depends On : perl>=5.10.0
Optional Deps : None
Have a nice day!!
Hope this helps
P.S. Here's another little tool I wrote you might find useful. Add to .bashrc
wtd: (What They Do)
alias wtd="pacman -Qi | sed -n '/Version/,/Install\ Script/!p' | grep -F -A2 "
Just type:
wtd program name
This will output the description for the program(s) with program name in the title.
Example:
wtd grep
Name : cgrep
Description : Provides many of the features of grep, egrep, and fgrep with
greatly enhanced performance
Name : grep
Description : A string search utility
Edit: Well, I just showed above with Perl (duh!) I'm still having a multi-line issue with the Provides line. Where a program shows more than one Provides entry it's only deleting the first line. I'll work on it and get back. Other than that this works (at least it should).
Edit2: Here is a slightly hacked form of the above command that at least fixes the perl issue. This will still fail when encountering other multi-line Provides lines. I think those are fairly rare so I'm leaving it at that. Sed does have limits and I'm sure a more complex command could be written using sed but I think this will get you in the ballpark.
pacman -Qi | sed -n '/^Name/,/^Required By/{ /^Version/,/^Provides/d; /^ *perl.*$/d; /^Required By/d; /^Name/{x;p;x}; p }'
Last edited by harryNID (2009-11-08 19:12:03) -
Run same install scripts only once
I recently found the install script mechanism quite inefficient (and I'm sure many other people have noticed it as well).
for example,if I install the texlive-most group, after every package installed, mktexlsr would run once. But actually, the only one that is necessary is the last one.
So I think if pacman could run every same install script only once, this would speed pacman up a lot (especially when you haven't upgrade for two months!)
Last edited by darkraven (2011-01-23 03:25:03)Get coding:
http://projects.archlinux.org/pacman.git/
http://mailman.archlinux.org/mailman/listinfo/
https://wiki.archlinux.org/index.php/Us … cman_Hooks -
[SOLVED] Pass Environment variables from PKGBUILD to .INSTALL script
Hi everyone,
I am trying to modify the grub2-efi-bzr (http://aur.archlinux.org/packages.php?ID=38369) package making some changes in the PKGBUILD and the post-install script. I want to pass few environment variables from the PKGBUILD to the install script. How do I do that?
Some code from the PKGBUILD
_bzrtrunk="lp:grub/grub2" # GRUB2 BZR Main Trunk
# _bzrtrunk="lp:~skodabenz/grub/grub2-bzr-exp" # GRUB2 BZR Experimental Branch
_bzrmod="grub2"
if [ ${_bzrtrunk} = "lp:~skodabenz/grub/grub2-bzr-exp" ]
then
_bzrmod="grub2_exp"
pkgver="exp_${pkgver}"
fi
# grub-extras bzr repo locations
_bzrtrunk_zfs="lp:~skodabenz/grub/grub2-extras-zfs"
_bzrtrunk_lua="lp:~skodabenz/grub/grub2-extras-lua"
if [ "$CARCH" = 'i686' ]
then
_EFI_ARCH=i386
elif [ "$CARCH" = 'x86_64' ]
then
_EFI_ARCH=x86_64
fi
# _EFI_ARCH=x86_64 # Uncomment if you want to override the if condition for _EFI_ARCH above, incase the EFI ARCH does not match the Linux Kernel ARCH.
# $CARCH=x86_64 and _EFI_ARCH=i386 requires gcc-multilib with lib32-glibc installed in the system.
# I do not know about $CARCH=i686 and _EFI_ARCH=x86_64
if [ ${_EFI_ARCH} = "i386" ]
then
pkgver="${pkgver}_x86"
_trns_name="grub2_efi_x86"
elif [ ${_EFI_ARCH} = "x86_64" ]
then
pkgver="${pkgver}_x64"
_trns_name="grub2_efi_x64"
fi
Now the post-install script needs the values of _EFI_ARCH and _trns_name env variables. I do not want to copy the if statements to that script as these are decided at compile time but needed while setting up grub2-efi. This is due to the fact that EFI-ARCH need not match the Linux Kernel ARCH. How do I do that.
Code from the post-install script
${_trns_name}-install --root-directory=/ --no-floppy --recheck --debug
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/lua.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfs.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/zfsinfo.mod /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/unifont.pf2 /boot/${_trns_name}/
cp /usr/lib/${_trns_name}/${_EFI_ARCH}-efi/ascii.pf2 /boot/${_trns_name}/
${_trns_name}-mkimage --verbose --directory=/usr/lib/${_trns_name}/${_EFI_ARCH}-efi --prefix="" --output=/boot/${_trns_name}/grub2.efi --format=${_EFI_ARCH}-efi ${_EFI_APP_MODULES}
Thank in advance.
Last edited by skodabenz (2010-07-27 15:46:40)falconindy wrote:
Don't rely on %foo% existing -- it won't after the first build and this will prevent the PKGBUILD from being reentrant. I would use something like this (untested):
sed -i "s|^\(_EFI_ARCH\)=.*|\1=${_EFI_ARCH}|; \
s|^\(_trns_name\)=.*|\1=${_trns_name}|; \
s|^\(export _EFI_APP_MODULES\)=.*|\1=${_EFI_APP_MODULES}|" \
${startdir}/grub2-efi-bzr.install
Your code works except for 1 problem in the install script I want
export __EFI_APP_MODULES="${_EFI_APP_MODULES}" (the passed ${_EFI_APP_MODULES} value should again come inside double quotes).
right now
export _EFI_APP_MODULES=ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm
which is equivalent to
export _EFI_APP_MODULES=ata
I want
export _EFI_APP_MODULES="ata part_gpt part_msdos fat ntfs ntfscomp ext2 iso9660 udf hfsplus fshelp normal chain linux ls search search_fs_file search_fs_uuid search_label help loopback boot configfile echo efi_gop efi_uga xnu xnu_uuid lvm"
How to do it with sed since sed already uses double quotes? -
Should/can the install script included in source=() list?
Hi,
It is a good thing that the sources needed to build a package are md5summed for integrity, but in most packages the install script is not. I was thinking why this might be - the PKGBUILD can be expected to modify the script?
So to try, in one of my packages I added the install script to the source=() list. The package builds of course just fine. Then, however, if I want to upload it to AUR, I try to make a source-only package with "makepkg --source", which brakes with something like this:
ln: creating symbolic link `/tmp/foo/srclinks.YjYgQ8XlE/foo/foo.install': File exists
This is because makepkg tries to create a 2 symbolic links with the same filename: one link for the "foo.install" in the source=() list and also for the install=() list....
Is this deliberate, or a bug? Looks more like a bug to me, but thought I better ask first....
Cheers,
Gregshining wrote:
imrehg wrote:
It might be completely internal to the pacman but defines actions taken on the system - thus whatever is in .install has effects just like the rest of the files, maybe even more: the other files are just copied, the .install is executed.
And while it might never get installed on the system, it's internals are - how else one could define a "post_uninstall()" if it wasn't stored? Being pacman developer you know much more about this than I do, can you give a bit of info on that?
Right it is installed to pacman database, but again, it is pacman doing all that.
Fair enough.... The detail, however, that is not installed does not preempt checksumming. Eg. patches are also: 1) used for the package, 2) not installed, and 3) still in the checksum....
shining wrote:
All I'm trying to get to, is there any serious reason (technical, not philosophical) NOT to checksum the install script as well? Because I'm yet to see any valid arguments against it, and there are loads for it....
Taking your example from kernel26 :
-i $startdir/kernel26.install
-i ${pkgdir}/etc/mkinitcpio.d/${pkgname}.preset
Note that the scriptlet edited is the original one in $startdir , because that's the only place where it needs to be, from the packager pov.
While for the preset file, it needs to be copied to $pkgdir and it is edited there.
If you had a checksum for the scriptlet, it would also mean that makepkg -g output could be altered after running makepkg. Very weird..
Ok, this is indeed the case. But if you look at real packages, it seems that after the package is compiled, many times they update the PKGBUILD with the new md5sum values. Again: core/kernel26.
That .install update section in the PKGBUILD is then relegated to a "helper function" role that keep the information in sync when there's a new release, but as the PKGBUILD is distributed, it won't change anything in the .install anymore...
Thus, again, there's no real difference between the .install files and other files used as source.
shining wrote:Btw the whole scriptlet file could be created entirely from the pkgbuild build function.
Sure, and that's a great thing! I actually wondered why so many packages have separate .install when it can be done in the PKGBUILD. Thought it might be some convention, but probably just habit.... I prefer doing it in the PKGBUILD as well, whenever possible...
shining wrote:There might be ways to fix that, though I don't even see any good ones. But why bother ? You said there are loads of valid arguments to have it , but you didn't even give one !
On the other hand, I'm yet to find any of your rebuttals that are not rebutted here again...
shining wrote:What are you worried about here ? Security ? If you think adding a checksum for the install file is going to give you any security, you are badly fooling yourself. If someone is distributing a malicious pkgbuild, it can contain the md5sum of the malicious scriptlet which is shipped with it.
I think you misunderstood me. I'm not complaining, but inquiring. The PKGBUILD system is awesome, and it makes me search out programs that I use but not in the repo/AUR so that I can make a new package. But also, I'm interested in the "how" and "why", and hope to improve things if possible. Now, to me it seems theres an unreasonable distinction to checksum some files needed for a package but not all of them. And thus I set out to ask the elders here on the Forum to see whether someone can shed light on the reasons of the current state. Not trying to piss of anybody, but being interested.
Of course the md5sum is not security, it's a help, nothing more.
As an example: some time ago, there was a package in the community (thus managed by TUs) that had an update. I wanted to check out something in the package, got the PKGBUILD and tried to make it myself - md5sum says that the sources are incorrect.... Obviously something must have gone very bad, because the md5sum field was updated according to the SVN, the package is available on pacman thus it had to build, and the sources used in the package have not been changed for a while so that cannot be a problem....
I've got a package from a trusted source and it is broken, the md5sum told me. So the breakage can be the very same way in the install script, why is the md5sum not allowed to tell me that?
shining wrote:The only security for pkgbuilds is yourself. When you get one from a strange place, you MUST read the pkgbuild/install files.
Of course, never argued against it. But there are different layers of verbosity....
Anyway.... -
Edit: Updated, check last post
I got tired of the long and annoying process of manually installing everything after the base system was installed, so I got bored one night about two weeks ago and decided to write this script. It will pretty much do everything I normally had to do and everything is taken from the Beginners Install Guide, such as:
asks you if you want to display or hide the output of pacman and other operations
configure the internet for dhcp
rank mirrors based on speed
update the system
installs NTFS-3g
implement a custom fstab (it got annoying to add 5 or so partitions in everytime manually)
add a user
installs alsa
installs the xserver along with the nvidia driver from the arch repo
installs commonly used fonts
gives you the choice of installing kdemod 3 or 4
installs firefox thunderbird compiz-fusion emerald and fusion-icon and others
copies desktop and autostart links
links my windows thunderbird and firefox profiles to my linux ones so that theyre in sync
and finally starts the appropriate desktop manager when everything is installed.
Eeverything in the script is well documented and is easy to read since my bash scripting knowledge isnt that advanced, so its easy to edit it for your own needs. You could just copy the script from here but I recommend you download the tar ball since the script refers to a lot of custom files that I made (such as specific rc.confs and pacman.confs for kde 3 and kde 4) and everything will work out of the box, you might have to change a few paths in the script though.
If anyone finds any bugs or can offer suggestions on how to improve the script I'd love to hear them! I'm still looking for a way to feed the firefox and thunderbird profile names directly into variables so that you dont have to enter them manually like you have to now. Edit: one more thing I just thought of, I'd like to colorize some of the outputs such as the ":: Installing [package name]" parts with the :: being blue and the text being white (just like it is when you boot up arch) but I have no idea on how to do it.
#! /bin/bash
# Written By Brandon Golway (Brando56894)#
echo "Do you want to display the output of the commands?"
echo "1) Yes"
echo "2) No"
echo
read output
if [[ "$output" == 1 ]]; then
echo "Which interface are you using?"
read interface
dhcpcd $interface
#location of where the script is being ran from
echo "Storing current location..."
location=`pwd`
#checks to see if the directory logs exists inside of the install.arch folder
#if it exists the directory is cleared, if it doesnt exist it is created
echo
echo "Checking to see if "$location"/logs exists..."
if [ -d logs ]; then
rm -f logs/*
echo "It does so old logs were erased"
else
mkdir logs
echo "It doesn't so the directory was created"
fi
#ranking mirrors based on speed
cp mirrorlist /etc/pacman.d/mirrorlist.bak
cd /etc/pacman.d
echo
echo ":: Updating package list and installing Python..."
pacman -Syy
pacman -S --noconfirm python
echo
echo "Ranking mirrors, this could take a few minutes..."
rm mirrorlist
rankmirrors -n 6 mirrorlist.bak > mirrorlist
cd $location
#copying pacman.conf with kdemod repositories
echo
echo "::Updating pacman and the system..."
pacman -Syy --noconfirm pacman
pacman -Syu --noconfirm
cp -f pacman.conf_kdemod3 /etc/pacman.conf
pacman -Syy
echo
echo "::Installing NTFS-3g..."
pacman -S --noconfirm ntfs-3g
echo
read -p "Edit fstab to correspond to the current partition layout (Hit Enter)"
nano fstab
clear
cp fstab /etc/fstab
mkdir /media/w7; mkdir /media/xp; mkdir /media/media;mkdir /media/mybook; mkdir /media/mint
mount -a
#adding users and groups
echo
echo "Name your user:"
read user
useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash $user
passwd $user
pacman -S --noconfirm sudo > logs/install.sudo
echo
read -p "Add this line to the sudoers file: "$user" ALL=(ALL) ALL"
EDITOR=nano visudo
clear
#configuring ALSA
echo
echo "::Installing ALSA..."
pacman -S --noconfirm alsa-utils alsa-oss
cp -f asound.state /etc/asound.state
#installing the Xserver
echo
echo "::Installing the Xserver..."
pacman -S --noconfirm xorg xf86-input-evdev mesa nvidia
cp -f xorg.conf /etc/X11/xorg.conf
depmod -a
#setting login manager
cp xinitrc /home/$user/.xinitrc
#installing common fonts
echo
echo "::Installing commonly used fonts..."
pacman -S --noconfirm ttf-ms-fonts ttf-dejavu ttf-bitstream-vera
echo
echo "Install KDEmod 3 or KDEmod 4?"
echo "1) KDEmod 3"
echo "2) KDEmod 4"
read decision
if [[ "$decision" == 1 ]]
then
echo
echo "::Installing KDEmod 3..."
cp -f pacman.conf_kdemod3 /etc/pacman.conf
pacman -Syy --noconfirm kdemod3 kdemod3-kdeutils-superkaramba
cp -f locale.gen /etc/locale.gen
locale-gen
cp -f rc.conf_kdemod3 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde/
else
echo
echo "::Installing KDEmod 4..."
cp -f pacman.conf_kdemod4 /etc/pacman.conf
pacman -Syy > logs/pkg.update
pacman -S --noconfirm kdemod kdemod-kdeutils-superkaramba
cp -f locale.gen /etc/locale.gen
locale-gen
cp -f rc.conf_kdemod4 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde4/
fi
echo
/etc/rc.d/hal start
#installing other stuff
echo
echo "::Installing firefox, thunderbird, yakuake, etc..."
pacman -S --noconfirm firefox thunderbird libdvdcss yakuake compiz-fusion-plugins-main compiz-fusion-plugins-extra compizconfig-backend-kconfig ccsm emerald fusion-icon ktorrent pidgin jre shaman samba lm_sensors
#customizing
cp bashrc /home/$user/.bashrc
mkdir /home/$user/Desktop
cp -f Desktop/* /home/$user/Desktop/
cp -Rf emerald /home/$user/.emerald
echo
echo "What is the name of the firefox profile?"
ls /media/w7/Users/Bran/AppData/Roaming/Mozilla/Firefox/Profiles
read firefox_profile
echo
echo "What is the name of the thunderbird profile?"
ls /media/w7/Users/Bran/AppData/Roaming/Thunderbird/Profiles
read thunderbird_profile
ln -s /media/w7/Users/Bran/AppData/Roaming/Firefox/$firefox_profile /home/$user/.firefox
ln -s /media/w7/Users/Bran/AppData/Roaming/Thunderbird/$thunderbird_profile /home/$user/.thunderbird
chown -R $user:$user /home/$user/
if [ "$decision" = 1 ]; then
/etc/rc.d/kdm3 start
else
/etc/rc.d/kdm start
fi
fi
#hides output
if [[ "$output" == 2 ]]; then
echo "Which interface are you using?"
read interface
dhcpcd eth1 $interface
#location of where the script is being ran from
echo "Storing current location..."
location=`pwd`
#checks to see if the directory logs exists inside of the install.arch folder
#if it exists the directory is cleared, if it doesnt exist it is created
echo
echo "Checking to see if "$location"/logs exists..."
if [ -d logs ]; then
rm -f logs/*
echo "It does so old logs were erased"
else
mkdir logs
echo "It doesn't so the directory was created"
fi
#ranking mirrors based on speed
cp mirrorlist /etc/pacman.d/mirrorlist.bak
cd /etc/pacman.d
echo
echo ":: Updating package list and installing Python..."
pacman -Syy>$location/logs/pkg.update
pacman -S --noconfirm python > $location/logs/install.python
echo
echo "Ranking mirrors, this could take a few minutes..."
rm mirrorlist
rankmirrors -n 6 mirrorlist.bak > mirrorlist
cd $location
#copying pacman.conf with kdemod repositories
echo
echo "::Updating pacman and the system..."
pacman -Syy --noconfirm pacman > logs/update.pacman
pacman -Syu --noconfirm > update.system
cp -f pacman.conf_kdemod3 /etc/pacman.conf
pacman -Syy > logs/pkg.refresh
echo
echo "::Installing NTFS-3g..."
pacman -S --noconfirm ntfs-3g > logs/install.ntfs3g
echo
read -p "Edit fstab to correspond to the current partition layout (Hit Enter)"
nano fstab
clear
cp fstab /etc/fstab
mkdir /media/w7; mkdir /media/xp; mkdir /media/media;mkdir /media/mybook; mkdir /media/mint
mount -a
#adding users and groups
echo
echo "Name your user:"
read user
useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash $user
passwd $user
pacman -S --noconfirm sudo > logs/install.sudo
echo
read -p "Add this line to the sudoers file: "$user" ALL=(ALL) ALL"
EDITOR=nano visudo
clear
#configuring ALSA
echo
echo "::Installing ALSA..."
pacman -S --noconfirm alsa-utils alsa-oss > logs/install.alsa
cp -f asound.state /etc/asound.state
#installing the Xserver
echo
echo "::Installing the Xserver..."
pacman -S --noconfirm xorg xf86-input-evdev mesa nvidia > logs/install.xserver
cp -f xorg.conf /etc/X11/xorg.conf
depmod -a
#setting login manager
cp xinitrc /home/$user/.xinitrc
#installing common fonts
echo
echo "::Installing commonly used fonts..."
pacman -S --noconfirm ttf-ms-fonts ttf-dejavu ttf-bitstream-vera > logs/install.fonts
echo
echo "Install KDEmod 3 or KDEmod 4?"
echo "1) KDEmod 3"
echo "2) KDEmod 4"
read decision
if [[ "$decision" == 1 ]]
then
echo
echo "::Installing KDEmod 3..."
cp -f pacman.conf_kdemod3 /etc/pacman.conf
pacman -Syy --noconfirm kdemod3 kdemod3-kdeutils-superkaramba > logs/install.kdemod3
cp -f locale.gen /etc/locale.gen
locale-gen > /dev/null
cp -f rc.conf_kdemod3 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde/
else
echo
echo "::Installing KDEmod 4..."
cp -f pacman.conf_kdemod4 /etc/pacman.conf
pacman -Syy > logs/pkg.update
pacman -S --noconfirm kdemod kdemod-kdeutils-superkaramba > logs/install.kdemod4
cp -f locale.gen /etc/locale.gen
locale-gen > /dev/null
cp -f rc.conf_kdemod4 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde4/
fi
echo
/etc/rc.d/hal start
#installing other stuff
echo
echo "::Installing firefox, thunderbird, yakuake, etc..."
pacman -S --noconfirm firefox thunderbird libdvdcss yakuake compiz-fusion-plugins-main compiz-fusion-plugins-extra compizconfig-backend-kconfig ccsm emerald fusion-icon ktorrent pidgin jre shaman samba lm_sensors > logs/install.otherstuff
#customizing
cp bashrc /home/$user/.bashrc
mkdir /home/$user/Desktop
cp -f Desktop/* /home/$user/Desktop/
cp -Rf emerald /home/$user/.emerald
echo
echo "What is the name of the firefox profile?"
ls /media/w7/Users/Bran/AppData/Roaming/Mozilla/Firefox/Profiles
read firefox_profile
echo
echo "What is the name of the thunderbird profile?"
ls /media/w7/Users/Bran/AppData/Roaming/Thunderbird/Profiles
read thunderbird_profile
ln -s /media/w7/Users/Bran/AppData/Roaming/Firefox/$firefox_profile /home/$user/.firefox
ln -s /media/w7/Users/Bran/AppData/Roaming/Thunderbird/$thunderbird_profile /home/$user/.thunderbird
chown -R $user:$user /home/$user/
if [ "$decision" = 1 ]; then
/etc/rc.d/kdm3 start
else
/etc/rc.d/kdm start
fi
fi
I thought you were able to attach files but I dont see the option anywhere so heres a link to megashare: Install Arch
Last edited by brando56894 (2009-05-17 02:09:19)I've made a lot of changes to the script so its easier for me to use such as:
removed the option to show or hide output, the only option is to show the output
it now checks which architecture youre running (32 or 64 bit)
removed the Firefox and Thunderbird linking
removed the need to press 'Enter' to edit fstab
removed the need to use visudo, it copies an already edited sudoers file (which you have to add)
added samba config
various bug fixes
#! /bin/bash
#determining architecture
arch=$(uname -m)
clear
#add if statement to see if /var/run/dhcpcd-eth0.pid exists
dhcpcd eth0
#location of where the script is being ran from
ialocation=`pwd`
#ranking mirrors based on speed
if [ "$arch" == "x86_64" ]
then
cp mirrorlist /etc/pacman.d/mirrorlist.bak
else
cp mirrorlist.x32 /etc/pacman.d/mirrorlist.bak
fi
cd /etc/pacman.d
echo
echo ":: Updating package list and installing Python..."
pacman -Syu
pacman -S --noconfirm --needed python
echo
echo "Ranking mirrors, this could take a few minutes..."
rm mirrorlist
rankmirrors -n 4 mirrorlist.bak > mirrorlist
cd $ialocation
echo
echo "::Installing NTFS-3g..."
pacman -S --noconfirm --needed ntfs-3g
cp fstab.template fstab
nano fstab
clear
cp fstab /etc/fstab
rm fstab
mkdir /media/w7; mkdir /media/xp; mkdir /media/media; mkdir /media/mybook
mount -a
#adding users and groups
echo
echo "Name your user:"
read user
useradd -m -G users,audio,lp,optical,storage,video,wheel,power -s /bin/bash $user
passwd $user
cp -f sudoers /etc/sudoers
clear
#configuring ALSA
echo
echo "::Installing ALSA..."
pacman -S --noconfirm --needed alsa-utils alsa-oss
cp -f asound.state /etc/asound.state
#installing the Xserver
echo
echo "::Installing the Xserver..."
pacman -S --noconfirm --needed xorg xf86-input-evdev mesa nvidia
cp -f xorg.conf /etc/X11/xorg.conf
depmod -a
#setting login manager
cp xinitrc /home/$user/.xinitrc
#installing common fonts
echo
echo "::Installing commonly used fonts..."
pacman -S --noconfirm --needed ttf-ms-fonts ttf-dejavu ttf-bitstream-vera
echo
echo "Install KDEmod 3 or KDEmod 4?"
echo "1) KDEmod 3"
echo "2) KDEmod 4"
read kde_version
if [[ "$kde_version" == 1 ]]
then
echo
echo "::Installing KDEmod 3..."
if [ "$arch" == "x86_64" ]
then
cp -f pacman.conf_kdemod3 /etc/pacman.conf
else
cp -f pacman.conf_kdemod3.x32 /etc/pacman.conf
fi
pacman -Sy --noconfirm --needed kdemod3
pacman -S --noconfirm --needed kdemod3-kdeutils-superkaramba amarok kdemod3-kdegraphics-ksnapshot
cp -f locale.gen /etc/locale.gen
locale-gen
cp -f rc.conf_kdemod3 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde/
#cd kdesudo-2.6
#./configure
#needs QT >=3.1 but <4.0
#make -s
#make -s install
#mv /opt/kde/bin/kdesu /opt/kde/bin/kdesu1
#ln -s /opt/kde/bin/kdesudo /opt/kde/bin/kdesu
else
echo
echo "::Installing KDEmod 4..."
if [ "$arch" == "x86_64" ]
then
cp -f pacman.conf_kdemod4 /etc/pacman.conf
else
cp -f pacman.conf_kdemod4.x32 /etc/pacman.conf
fi
pacman -Syy --noconfirm --needed kdemod kdemod-kdeutils-superkaramba kdemod-kdebase-kwrite amarok-base
cp -f locale.gen /etc/locale.gen
locale-gen
cp -f rc.conf_kdemod4 /etc/rc.conf
cp -Rf Autostart /home/$user/.kde4/
fi
#echo
#/etc/rc.d/hal start
if [ "$arch" == "x86_64" ]
then
#installing 32bit chroot environment
mkdir /opt/arch32
cd /etc/pacman.d
mv mirrorlist mirrorlist.x64
cp $ialocation/mirrorlist.x32 mirrorlist
pacman --root /opt/arch32 --cachedir /opt/arch32/var/cache/pacman/pkg -Sy --needed base base-devel schroot ttf-bitstream-vera ttf-ms-fonts
mv -f mirrorlist.x64 mirrorlist
cd /opt/arch32/etc
ln -f /etc/passwd* .
ln -f /etc/shadow* .
ln -f /etc/group* .
ln -f /etc/rc.conf .
ln -f /etc/resolv.conf .
ln -f /etc/localtime .
ln -f /etc/locale.gen .
ln -f /etc/profile.d/locale.sh profile.d
cp /etc/vimrc .
cp /etc/mtab .
cd $ialocation
fi
#installing other stuff
echo
echo "::Installing firefox, thunderbird, yakuake, etc..."
pacman -S --noconfirm --needed firefox thunderbird libdvdcss kdemod3-yakuake ktorrent pidgin jre shaman samba flashplugin lm_sensors gdb libsexy cups filelight
pacman -S --noconfirm --needed compiz-fusion-kde
echo
echo "::Installing and Configuring Samba"
pacman -S --noconfirm --needed samba
cp smb.conf /etc/samba/smb.conf
smbpasswd -a $user
pacman -Rd --noconfirm --needed fam
pacman -S --noconfirm --needed gamin
#customizing
cp bashrc /home/$user/.bashrc
mkdir /home/$user/Desktop
cp -f Desktop/* /home/$user/Desktop/
cp -Rf emerald /home/$user/.emerald
mkdir -p /home/$user/.config/compiz
chown $user:$user /home/$user/.config/compiz
cp bashrc /root/.bashrc
echo
chown -R $user:$user /home/$user/
read -p "Press Enter to reboot"
reboot
Install Arch Archive
Last edited by brando56894 (2009-05-17 02:38:40) -
Archlinux (after fresh) Install Script
I want to share my archlinux install script dat i use after do a fresh install, if u have any idea of how to make it better pls post here
#!/bin/bash
# By helmuthdu
#custom repositories #{{{
read -p "Install custom repositories [y][n]: " OPTION
if [ $OPTION = "y" ]; then
echo -e '[ayatana]\nServer = http://repo.ayatana.info/' >> /etc/pacman.conf
fi
#system update #{{{
pacman -Syu
read -p "Reboot your system [y][n]: " OPTION
if [ $OPTION = "y" ]; then
reboot
fi
#create a new user #{{{
read -p "New user name: " USERNAME
useradd -m -g users -G users,audio,lp,optical,storage,video,wheel,games,power,scanner -s /bin/bash $USERNAME
passwd $USERNAME
#set user as sudo #{{{
pacman -S --noconfirm sudo
EDITOR=nano visudo
#install yaourt #{{{
read -p "Install yaourt [y][n]" OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm base-devel yajl
su -l $USERNAME --command="
wget http://aur.archlinux.org/packages/package-query/package-query.tar.gz;
tar zxvf package-query.tar.gz;
cd package-query;
makepkg --noconfirm -si;
cd ..;
rm -fr package-query*
su -l $USERNAME --command="
wget http://aur.archlinux.org/packages/yaourt/yaourt.tar.gz;
tar zxvf yaourt.tar.gz;
cd yaourt;
makepkg --noconfirm -si;
cd ..;
rm -fr yaourt*
fi
#base system #{{{
pacman -S --noconfirm curl bc rsync mlocate bash-completion vim
pacman -S --noconfirm gutenprint foomatic-db foomatic-db-engine foomatic-db-nonfree foomatic-filters hplip splix cups-pdf
pacman -S --noconfirm ntfs-3g ntfsprogs
pacman -S --noconfirm rssh openssh samba
#configure ssh/samba #{{{
echo -e "sshd: ALL\n# End of file" > /etc/hosts.allow
echo -e "ALL: ALL: DENY\n# End of file" > /etc/hosts.deny
cp /etc/samba/smb.conf.default /etc/samba/smb.conf
#ssh_conf #{{{
sed -i '/ListenAddress/s/^#//' /etc/ssh/sshd_config
sed -i '/SyslogFacility/s/^#//' /etc/ssh/sshd_config
sed -i '/LogLevel/s/^#//' /etc/ssh/sshd_config
sed -i '/LoginGraceTime/s/^#//' /etc/ssh/sshd_config
sed -i '/PermitRootLogin/s/^#//' /etc/ssh/sshd_config
sed -i '/StrictModes/s/^#//' /etc/ssh/sshd_config
sed -i '/RSAAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i '/PubkeyAuthentication/s/^#//' /etc/ssh/sshd_config
sed -i '/IgnoreRhosts/s/^#//' /etc/ssh/sshd_config
sed -i '/PermitEmptyPasswords/s/^#//' /etc/ssh/sshd_config
sed -i '/X11Forwarding/s/^#//' /etc/ssh/sshd_config
sed -i '/X11Forwarding/s/no/yes/' /etc/ssh/sshd_config
sed -i '/X11DisplayOffset/s/^#//' /etc/ssh/sshd_config
sed -i '/X11UseLocalhost/s/^#//' /etc/ssh/sshd_config
sed -i '/PrintMotd/s/^#//' /etc/ssh/sshd_config
sed -i '/PrintMotd/s/yes/no/' /etc/ssh/sshd_config
sed -i '/PrintLastLog/s/^#//' /etc/ssh/sshd_config
sed -i '/TCPKeepAlive/s/^#//' /etc/ssh/sshd_config
pacman -S --noconfirm tar gzip bzip2 unzip unrar p7zip
pacman -S --noconfirm alsa-utils alsa-oss alsa-plugins
sed -i '/MODULES/s/MODULES=(/&fuse/' /etc/rc.conf
#install video driver #{{{
pacman -S --noconfirm xorg-server xorg-xinit xorg-utils xorg-server-utils xorg-xauth xf86-input-evdev xf86-input-synaptics
pacman -S --noconfirm mesa mesa-demos
read -p "Video driver (intel|nvidia|nouveau|virtualbox): " VIDEO
if [ $VIDEO = "intel" ]; then
pacman -S --noconfirm libgl xf86-video-intel
elif [ $VIDEO = "nvidia" ]; then
pacman -S nvidia nvidia-utils
elif [ $VIDEO = "nouveau" ]; then
pacman -S --noconfirm libgl xf86-video-nouveau nouveau-dri
modprobe nouveau
sed -i '/MODULES/s/^[^ ]*\>/& nouveau/' /etc/rc.conf
elif [ $VIDEO = "virtualbox" ]; then
pacman -S --noconfirm virtualbox-archlinux-additions
modprobe -a vboxguest vboxsf vboxvideo
sed -i '/MODULES/s/^[^ ]*\>/& vboxguest vboxsf vboxvideo/' /etc/rc.conf
groupadd vboxsf
gpasswd -a $USERNAME vboxsf
fi
#git access thru a firewall #{{{
#this config help me to bypass the company firewall for git access
TOR=""
read -p "config git access thru a firewall [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm gtk-doc openbsd-netcat vidalia privoxy git"
echo 'forward-socks5 / 127.0.0.1:9050 .' >> /etc/privoxy/config
echo -e '#!/bin/bash\nnc.openbsd -xlocalhost:9050 -X5 $*' >> /usr/bin/proxy-wrapper
chmod +x /usr/bin/proxy-wrapper
echo -e '\nexport GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"' >> /etc/bash.bashrc
export GIT_PROXY_COMMAND="/usr/bin/proxy-wrapper"
groupadd -g 42 privoxy
useradd -u 42 -g privoxy -s /bin/false -d /etc/privoxy privoxy
pacman -S --noconfirm tor privoxy
rc.d restart tor privoxy
su -l $USERNAME --command="sudo /etc/rc.d/tor restart"
su -l $USERNAME --command="sudo /etc/rc.d/privoxy restart"
TOR="tor privoxy"
fi
#install desktop environment #{{{
read -p "Desktop Environment (Gnome|KDE): " DE
#gnome #{{{
if [ $DE = "gnome" ]; then
#desktop #{{{
pacman -S --noconfirm gnome gnome-extra
pacman -S --noconfirm gamin pulseaudio-gnome gnome-tweak-tool telepathy deja-dup
pacman -S --noconfirm gnome-packagekit gnome-settings-daemon-updates
pacman -Rdd --noconfirm sushi
su -l $USERNAME --command="yaourt -S --noconfirm gloobus-sushi-bzr"
su -l $USERNAME --command="yaourt -S --noconfirm gnome-shell-system-monitor-applet-git gnome-shell-extension-noa11y-git gnome-shell-extension-weather-git gnome-shell-extension-user-theme gnome-shell-extension-workspace-indicator gnome-shell-extension-places-menu gnome-shell-extension-dock gnome-shell-extension-pomodoro gnome-shell-extension-mediaplayer-git"
#aparencia #{{{
su -l $USERNAME --command="yaourt -S --noconfirm faience-icon-theme elementary-icons"
su -l $USERNAME --command="yaourt -S --noconfirm zukitwo-themes light-themes-bzr egtk-bzr"
su -l $USERNAME --command="yaourt -S --noconfirm gnome-shell-theme-faience gnome-shell-theme-nord gnome-shell-theme-eos"
#acessórios #{{{
su -l $USERNAME --command="yaourt -S --noconfirm docky guake gpaste kupfer automounter"
su -l $USERNAME --command="yaourt -S --noconfirm gnome-activity-journal libzeitgeist zeitgeist-datahub zeitgeist-extensions"
su -l $USERNAME --command="yaourt -S --noconfirm gedit-plugins gedit-latex"
su -l $USERNAME --command="yaourt -S --noconfirm nautilus-open-terminal nautilus-terminal nautilus-dropbox gnome-defaults-list"
su -l $USERNAME --command="echo -e '[general]\ndef_term_height=10\ndef_visible=0\n\n[terminal]\nshell=/bin/bash' > ~/.nautilus-terminal"
#escritório #{{{
pacman -S --noconfirm libreoffice-pt-BR libreoffice-{base,calc,draw,impress,math,writer,gnome} libreoffice-extension-presenter-screen libreoffice-extension-pdfimport
pacman -S --noconfirm chmsee
#impressão #{{{
pacman -S --noconfirm system-config-printer-gnome
#graficos #{{{
pacman -S --noconfirm shotwell
#internet #{{{
#networkmanager #{{{
NETWORKMANAGER="network"
read -p "Install networkmanager [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm networkmanager network-manager-applet
groupadd networkmanager
gpasswd -a $USERNAME networkmanager
NETWORKMANAGER="networkmanager"
fi
#multimedia #{{{
su -l $USERNAME --command="yaourt -S --noconfirm exaile exfalso transmageddon"
#arista #{{{
read -p "Install arista [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm arista-transcoder"
fi
#outros #{{{
pacman -S --noconfirm gksu gvfs-smb xdg-user-dirs
su -l $USERNAME --command="yaourt -S --noconfirm figlet cowsay conky-lua"
LOGINMANAGER=gdm
#KDE #{{{
elif [ $DE = "kde" ]; then
#desktop #{{{
pacman -S --noconfirm kde kde-l10n-pt_br yakuake
pacman -Rcsn --noconfirm kdenetwork-kopete kdemultimedia-kscd kdemultimedia-juk kdemultimedia-dragonplayer
#aparencia #{{{
su -l $USERNAME --command="yaourt -S --noconfirm chakra-gtk-config"
su -l $USERNAME --command="yaourt -S --noconfirm oxygen-gtk qtcurve-gtk2 qtcurve-kde4"
su -l $USERNAME --command="yaourt -S --noconfirm kfaenza-icon-theme"
su -l $USERNAME --command="yaourt -S --noconfirm yakuake-skin-plasma-oxygen-panel plasma-icontasks plasma-theme-caledonia kdm-theme-caledonia ksplash-caledonia bespin-svn"
# impressão #{{{
pacman -S --noconfirm kdeadmin-system-config-printer-kde
# escritório #{{{
pacman -S --noconfirm libreoffice-pt-BR libreoffice-{base,calc,draw,impress,math,writer,kde4} libreoffice-extension-presenter-screen libreoffice-extension-pdfimport
pacman -S --noconfirm kchmviewer
#graficos #{{{
pacman -S --noconfirm digikam kipi-plugins
#internet #{{{
pacman -S --noconfirm choqok
pacman -S --noconfirm telepathy-kde telepathy
#networkmanager #{{{
NETWORKMANAGER="network"
read -p "Install networkmanager [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm networkmanager kdeplasma-applets-networkmanagement
groupadd networkmanager
gpasswd -a $USERNAME networkmanager
NETWORKMANAGER="networkmanager"
fi
#multimediaa #{{{
pacman -S --noconfirm amarok k3b dvd+rw-tools
su -l $USERNAME --command="yaourt -S --noconfirm vlc phonon-vlc"
su -l $USERNAME --command="yaourt -S --noconfirm minitube musique bangarang"
# sistema #{{{
su -l $USERNAME --command="yaourt -S --noconfirm kdirwatch kcm-wacomtablet quickaccess-plasmoid"
su -l $USERNAME --command="yaourt -S --noconfirm apper-git"
LOGINMANAGER=kdm
fi
#desenvolvimento #{{{
#qtcreator #{{{
read -p "Install qtcreator [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm qtcreator qt-doc
mkdir -p /home/$USERNAME/.config/Nokia/qtcreator/styles
wget http://angrycoding.googlecode.com/svn/branches/qt-creator-monokai-theme/monokai.xml
mv monokai.xml /home/$USERNAME/.config/Nokia/qtcreator/styles/
chown -R $USERNAME:users /home/$USERNAME/.config
fi
#gvim #{{{
read -p "Install gvim [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -Rdd --noconfirm vim
pacman -S --noconfirm gvim meld splint tidyhtml pyflakes ctags wmctrl
su -l $USERNAME --command="yaourt -S --noconfirm jsl"
sed -i '/Icon/s/gvim/vim/g' /usr/share/applications/gvim.desktop
fi
#acessórios #{{{
read -p "Install wunderlist [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm wunderlist"
fi
#escritório #{{{
pacman -S --noconfirm aspell-pt
su -l $USERNAME --command="yaourt -S --noconfirm hunspell-pt-br"
read -p "Install Latex support [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm texlive-latexextra texlive-langextra lyx
su -l $USERNAME --command="yaourt -S --noconfirm abntex"
fi
#ferramentas de sistema #{{{
pacman -S --noconfirm htop grsync
pacman -S --noconfirm wine wine_gecko winetricks
su -l $USERNAME --command="yaourt -S --noconfirm toilet figlet cowsay conky-lua-old"
read -p "Install Virtualbox [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm virtualbox virtualbox-additions
su -l $USERNAME --command="yaourt -S --noconfirm virtualbox-ext-oracle"
modprobe vboxdrv
sed -i '/MODULES/s/^[^ ]*\>/& vboxdrv/' /etc/rc.conf
groupadd vboxusers
gpasswd -a $USERNAME vboxusers
fi
#graficos #{{{
pacman -S --noconfirm gimp inkscape uniconvertor python2-numpy python-lxml
su -l $USERNAME --command="yaourt -S --noconfirm xmind"
su -l $USERNAME --command="yaourt -S --noconfirm gimp-paint-studio gimp-resynth gimpfx-foundry gimp-plugin-pandora gimp-plugin-saveforweb"
#internet #{{{
pacman -S --noconfirm firefox firefox-i18n-pt-br thunderbird thunderbird-i18n-pt-br flashplugin
pacman -Rdd --noconfirm jre7-openjdk jdk7-openjdk
su -l $USERNAME --command="yaourt -S --noconfirm jdk"
su -l $USERNAME --command="yaourt -S --noconfirm google-chrome jdownloader"
LAMP=""
read -p "Install LAMP [y][n]: " OPTION
if [ $OPTION = "y" ]; then
pacman -S --noconfirm apache mysql php php-apache php-mcrypt php-gd
su -l $USERNAME --command="yaourt -S --noconfirm adminer"
rc.d restart httpd mysqld
/usr/bin/mysql_secure_installation
echo -e '\n# adminer configuration\nInclude conf/extra/httpd-adminer.conf' >> /etc/httpd/conf/httpd.conf
echo -e 'application/x-httpd-php php' >> /etc/httpd/conf/mime.types
echo -e '\n# Use for PHP 5.x:\nInclude conf/extra/php5_module.conf\nLoadModule php5_module modules/libphp5.so\nAddHandler php5-script php' >> /etc/httpd/conf/httpd.conf
sed -i 's/DirectoryIndex\ index.html/DirectoryIndex\ index.html\ index.php/g' /etc/httpd/conf/httpd.conf
sed -i 's/public_html/Sites/g' /etc/httpd/conf/extra/httpd-userdir.conf
sed -i '/mcrypt.so/s/^;//' /etc/php/php.ini
sed -i '/mysqli.so/s/^;//' /etc/php/php.ini
sed -i '/mysql.so/s/^;//' /etc/php/php.ini
sed -i '/gd.so/s/^;//' /etc/php/php.ini
su -l $USERNAME --command="mkdir -p ~/Sites"
su -l $USERNAME --command="chmod 775 ~/ && chmod -R 775 ~/Sites"
rc.d restart httpd mysqld
LAMP="httpd mysqld"
fi
#jogos #{{{
read -p "Install Games [y][n]: " OPTION
if [ $OPTION = "y" ]; then
read -p "Install Astromenace [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm astromenace"
fi
read -p "Install Maniadrive [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm maniadrive"
fi
read -p "Install World of Padman [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm worldofpadman"
fi
read -p "Install Wesnoth [y][n]: " OPTION
if [ $OPTION = "y" ]; then
read -p "Install Devel Version [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm wesnoth-devel"
else
pacman -S --noconfirm wesnoth
fi
fi
read -p "Install Simutrans [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm simutrans"
fi
read -p "Install Heroes of Newerth [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm hon"
fi
read -p "Install Tales of Maj'Eyal: Age of Ascendancy [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm tome4"
fi
read -p "Install Numptyphysics [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm numptyphysics-svn"
fi
read -p "Install Counter-Strike 2D [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm counter-strike-2d"
fi
read -p "Install M.A.R.S. [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm mars-shooter"
fi
read -p "Install SuperTuxKart [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm supertuxkart"
fi
read -p "Install OpenTyrian [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm opentyrian-hg"
fi
read -p "Install Warsow [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm warsow"
fi
read -p "Install Doukutsu [y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm doukutsu"
fi
fi
#multimedia #{{{
su -l $USERNAME --command="yaourt -S --noconfirm gstreamer0.10-plugins pulseaudio"
su -l $USERNAME --command="yaourt -S --noconfirm libquicktime libdvdread libdvdnav libdvdcss codecs cdrdao"
su -l $USERNAME --command="yaourt -S --noconfirm xbmc"
read -p "Install midi support[y][n]: " OPTION
if [ $OPTION = "y" ]; then
su -l $USERNAME --command="yaourt -S --noconfirm timidity++ fluidr3"
echo -e 'soundfont /usr/share/soundfonts/fluidr3/FluidR3GM.SF2' >> /etc/timidity++/timidity.cfg
fi
#font #{{{
su -l $USERNAME --command="yaourt -S --noconfirm ttf-ms-fonts ttf-dejavu ttf-liberation ttf-kochi-substitute ttf-google-webfonts ttf-roboto"
read -p "Install patched font configuration [(i)nfinity][(u)buntu][(n)one]: " OPTION
if [ $OPTION = "i" ]; then
pacman -Rdd --noconfirm freetype2
su -l $USERNAME --command="yaourt -S freetype2-infinality"
wget http://www.infinality.net/files/local.conf
mv local.conf /etc/fonts/
elif [ $OPTION = "u" ]; then
pacman -Rdd --noconfirm cairo fontconfig freetype2 libxft
su -l $USERNAME --command="yaourt -S --noconfirm cairo-ubuntu fontconfig-ubuntu freetype2-ubuntu"
fi
# misc #{{{
#configure rc.conf #{{{
sed -i /"DAEMONS"/d /etc/rc.conf
echo "DAEMONS=(syslog-ng crond alsa sshd samba dbus cupsd $TOR $LAMP $LOGINMANAGER $NETWORKMANAGER)" >> /etc/rc.conf
echo "System configuration complete"
#reboot #{{{
read -p "Reboot your system [y][n]: " OPTION
if [ $OPTION = "y" ]; then
reboot
fi
Last edited by helmuthdu (2011-11-17 22:05:09)I appreciate the reply.
My fresh install from the DVD finished and the problem was still occurring. I'm now zeroing the data (one pass), per your suggestion. I'll then do an install of Leopard via Firewire, as I'm unable to start it from the DVD.
I'm curious how a bad install would prevent the computer from starting from a CD/DVD. I'm able to use the install CD/DVD in other computer without any problems, so I don't believe the physical disk is the issue. When I start while holding OPTION, and insert the DVD, it comes up as a boot-able option. Also, the disk image I initially used hasn't had any issues to date.
Thanks again,
Ben -
"Arch By Hand" UEFI GPT SSD LUKS Install Script
Arch UEFI GPT LUKS (and non LUKS version) Automated Install Example Script, SSD friendly
Please note that if you're going to use this you're going to have to a) customize it to fit your needs and b) know what system config you need to do post install (rc.* etc). It's a jumping off point.
Want to put in a lot of effort just to get Arch Linux listed in your "bios" startup options? You're in the right post! Well, it's more than just that, of course. If you have an EFI machine, increasingly common, this might be of interest.
I got this working on my x220 tablet and thought I'd post it here. I imagine that as Archboot and the official installer rev we'll see them support this kind of thing as well, so BBS seemed like a good place to post it, but if there is an appropriate wiki location I could add it there as well.
This is pretty bare bones (otherwise you'd be using AIF or Archboot, natch) and should be customized for your own install purposes. Nonetheless, I suspect others may have been banging their heads on the low overhang of UEFI/GPT install and hope this helps them get up and running.
This is pretty much all in the wiki and BBS in various places, particularly the GRUB2 wiki entry. However the GPT partitioning (and learning more of sgdisk) were challenging enough that I felt it would be useful for others to see a working script.
I used the current-as-of-this-post Archboot iso (archlinux-2011.10-1-archboot.iso).
Don't just dd the archlinux iso to a usb. Format the USB stick as an MBR FAT drive and dump the entire Archboot ISO contents to it. To be honest, I did this in an Ubuntu vmware image I had on my mac, though I'd like to include command line options for doing this. TODO!
I also stuck the script (included herein) on the drive, but you could get it on the installation image at install time as well via scp or whatever you prefer.
On my x220 I then set the UEFI "BIOS" (the UEFI setup) to boot *ONLY* from UEFI. Pretty important. You should probably also stack your USB drive to top of your startup list or manually select it at boot time.
Boot from the USB stick. For my x220 I selected the second of the four efi grub options, x86_64.
Once Archboot is up, immediately leave the installer (option 8)
You may want to mount the usb drive to /src if you stuck this script on it. Archboot in UEFI mode doesn't seem to mount the usb drive properly (and the normal Archboot efi install will fail as well due to this). I think this is getting fixed in the next Archboot release, from what I've read on BBS.
# mount /dev/sdb1 /src
Run the script. For me this is
# /src/myarch.sh
(WARNING: will nuke everything on /dev/sda unless you've changed it).
There are probably things that could be done better/cleaner, feel free to point those out. This is really just a jumping off point.
UPDATE 15 NOV 2011: This now sources most packages locally to avoid kernel mismatch between install medium and install target.
UPDATE 16 NOV 2011: Script now unified the boot and efi partitions.
UPDATE 17 NOV 2011: Migrated code to github, including two versions (non-encrypted and LUKS-encrypted)
UPDATE 18 NOV 2011: Added encrypted swap
UPDATE 18 NOV 2011: Changed /boot/efi/grub to /boot/grub; removed extraneous /boot/efi directory entirely.
UPDATE 19 NOV 2011: Added a post-install script to handle user setup, etc. No reboot required.
UPDATE 20 NOV 2011: Post install section more complete, visudo automation added.
See code at: https://github.com/altercation/arch-by-hand
Last edited by altercation (2011-11-20 21:09:33)I've come up with this script (although it's not quite right either):
#!/bin/bash
# prereqs:
# mount /dev/sdb1 /src
set -o nounset
#set -o errexit
INSTALL_TARGET="/mnt"
HR="--------------------------------------------------------------------------------"
# Initialize
# Warn
timer=9
echo -n "This procedure will completely format /dev/sda. Please cancel with ctrl-c to cancel within $timer seconds..."
while [[ $timer -gt 0 ]]
do
sleep 1
let timer-=1
echo -en "$timer seconds..."
done
echo "Starting"
# Configure_Host
echo -e "\nFormatting disk...\n$HR"
# disk prep
sgdisk -Z /dev/sda # zap all on disk
sgdisk -a 2048 -o /dev/sda # new gpt disk 2048 alignment
# create partitions
sgdisk -n 1:0:+250M /dev/sda # partition 1 (UEFI BOOT), default start block, 250MB
sgdisk -n 2:0:+2G /dev/sda # partition 2 (SWAP), default start block, 2G
sgdisk -n 3:0:+100M /dev/sda # partition3, (BOOT), boot partition
sgdisk -n 4:0:+10G /dev/sda # partition 4, (ARCH), default start, remaining space
sgdisk -n 5:0:0 /dev/sda # partition 5, (HOME)
# set partition types
sgdisk -t 1:ef00 /dev/sda
sgdisk -t 2:8200 /dev/sda
sgdisk -t 3:8300 /dev/sda
sgdisk -t 4:8300 /dev/sda
sgdisk -t 5:8300 /dev/sda
# label partitions
sgdisk -c 1:"UEFI BOOT" /dev/sda
sgdisk -c 2:"SWAP" /dev/sda
sgdisk -c 3:"BOOT" /dev/sda
sgdisk -c 4:"ARCH" /dev/sda
sgdisk -c 5:"HOME" /dev/sda
# make filesystems
echo -e "\nCreating Filesystems...\n$HR"
mkfs.vfat /dev/sda1
mkswap /dev/sda2
mkfs.ext2 /dev/sda3
mkfs.ext4 /dev/sda4
mkfs.ext4 /dev/sda5
# Run /arch/setup
echo -n "Don't select Grub as your bootloader and exit setup before the Install Bootloader step"
/arch/setup
# unmount filesytems
umount /dev/sda1
swapoff /dev/sda2
umount /dev/sda3
umount /dev/sda5
# Get Network
echo -n "Waiting for network address.."
#dhclient eth0
dhcpcd -p eth0
echo -n "Network address acquired."
# Update Pacman
echo -e "\nUpdating pacman...\n$HR"
sed -i "s/^#S/S/" /etc/pacman.d/mirrorlist
pacman --noconfirm -Sy
pacman --noconfirm --needed -S pacman
pacman --noconfirm -S gptfdisk btrfs-progs-unstable
# Prepare to chroot to target
mv ${INSTALL_TARGET}/etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf.orig
cp /etc/resolv.conf ${INSTALL_TARGET}/etc/resolv.conf
sed -i "s/^#S/S/" ${INSTALL_TARGET}/etc/pacman.d/mirrorlist
mount -t proc proc ${INSTALL_TARGET}/proc
mount -t sysfs sys ${INSTALL_TARGET}/sys
mount -o bind /dev ${INSTALL_TARGET}/dev
echo -e "${HR}\nINSTALL BASE COMPLETE\n${HR}"
# Write Files
# install_efi (to be run *after* chroot /install)
touch ${INSTALL_TARGET}/install_efi
chmod a+x ${INSTALL_TARGET}/install_efi
cat > ${INSTALL_TARGET}/install_efi <<EFIEOF
mount /boot
mount /boot/efi
modprobe efivars
modprobe dm-mod
pacman --noconfirm -Sy
pacman --noconfirm --needed -S pacman
pacman --noconfirm -R grub
pacman --noconfirm -S grub2-efi-i386
grub_efi_i386-install --root-directory=/boot/efi --boot-directory=/boot/efi/efi --bootloader-id=grub --no-floppy --recheck
efibootmgr --create --gpt --disk /dev/sda --part 1 --write-signature --label "ARCH LINUX" --loader "\\EFI\\grub\\grub.efi"
grub-mkconfig -o /boot/efi/efi/grub/grub.cfg
exit
EFIEOF
# Install EFI
chroot /install /install_efi
rm /install/install_efi -
Discussion about the 'changelog' option from PKGBUILD
Hi people,
I am curious about the changelog option of PKGBUILD[1]. I don't remember seeing many packages (if any!) using that option.
I stumbled upon this when I viewed the feh[2] PKGBUILD[3], which has just been updated. This PKGBUILD doesn't use such option, but feh ships with a changelog file:
thiago@arch ~ $ head /usr/share/doc/feh/ChangeLog
Sun, 27 Apr 2014 20:28:02 +0200 Daniel Friesel <[email protected]>
* Release v2.11
* Patch by Michael Vorburger: Fix erroneous free() in case of failed
scandir (closes #140, #147)
* Patch by rangerer: --randomize: re-randomize after list is through
(closes #154)
* When setting a wallpaper from a URL, do not try to store it as
absolute path in .fehbg (closes #153)
* Add --scroll-step <px> option to change scroll_{up,left,down,right}
Well, the specific question about feh is: should I file a bug report about this?
Now, about changelogs in general: should we care about this feature?
From the packages I currently have installed, I found that only 7 of them use the changelog option. You can quickly count yours with:
thiago@arch ~ $ pacman -Qc > output; grep -v 'no changelog' output | grep 'Changelog for'
Changelog for gdal:
Changelog for geos:
Changelog for kchmviewer:
Changelog for libgeotiff:
Changelog for powertop:
Changelog for proj:
Changelog for spotify:
(a couple of error messages also appears, from packages without changelogs in their PKGBUILDs).
[1]: https://wiki.archlinux.org/index.php/PKGBUILD#changelog
[2]: https://www.archlinux.org/packages/extra/x86_64/feh/
[3]: https://projects.archlinux.org/svntogit … ckages/feh
There is also an old discussion here[4].
[4]: https://bbs.archlinux.org/viewtopic.php?id=70557
From Allan's response on #13, I had an idea: what if pacman -Qc (or similar), instead of showing the changelog pointed out in the PKGBUILD, showed us the last commit(s) from our official SVN repo? Would be relevant to open a new feature request on the bugtracker with this idea?
Last edited by thiagowfx (2014-04-28 03:59:41)There are many causes for each of the errors mention. It would be best to put one issue to the forum at a time. For example, some of these issues occur then tasks are deleted from projects but a timesheet has been submitted. Depending
on the scenario, some of these issues have been fixed with the latest service pack.
Other issues are due to bad scheduling habits with the project managers and so first determining what they have done can help resolve some the issues.
_error Loading, is because something is NULL in the data and the jave is choking when it build the form. Again, these may be because of delete tasks, resources, projects or someone doing copying and pasting of rows.
cheers!
PS. Train your PM to not COPY and PASTE rows in project schedules. It can be done, but it can create problems. There are over 500 fields and some have unique data and the copy paste creates havic.
Michael Wharton, MVP, MBA, PMP, MCT, MCTS, MCSD, MCSE+I, MCDBA
Website http://www.WhartonComputer.com
Blog http://MyProjectExpert.com contains my field notes and SQL queries -
Using subsitiutions in the install scripts
This should be pretty obvious, but I can't find the answer in the documentation.
Using Apex 3.1.2, in the Shared Objects, I've created a substitution named "TABLESPACE". The application uses a set of tables, the install should create these tables, and DBA have funny ideas about where these tables should be created, so I'd like to offer the option of having the install process ask for and use the TABLESPACE.
So I create an install script called "create tables". The script text has the following:
CREATE TABLE table1 (ID NUMBER, NAME VARCHAR2(30))
TABLESPACE ??;
So how do I use the TABLESPACE substitution value in the install script above? Use "&TABLESPACE:", use ":TABLESPACE"?
Edited by: tjoneslo on Nov 25, 2008 11:56 AMTo answer my own question. The install scripts are run as sql (or pl/sql) statements. You can access the pre-defined substitution strings via the v('NAME') parameter call (e.g. v('APP_USER')) but the application substitution strings, even though we are prompting for them, are not available.
Which would make for a good enhancement. -
About post install scripts...
hi,
i wonder if there is a solution for the post-install script problem to prevent some commands like "rm -rf /" to be executed. I know that Gentoo hasn't got this problem because ebuild scripts use a particular language that doesn't implement a such command. But for Arch which uses bash, could this problem be really resolved ?
Comete.Toth wrote:[...]
A package is software, and you have to trust that the software you are downloading is legit. If it is, and you trust the packager, you have no reason not to trust the package.
exactly ---> do not download from sources you dont trust
(if you ever worked on a windows, you know that already, because there is a lot of evil things around (spyware, virus, bacteria, nice VB-scripts, nice JS-scripts ...))
-> the problem about security: if your OS becomes popular, then the bad guys see it as enough popular to do something bad with it
Toth wrote:I assure you, if the package maintainers ever run across a submitted package with "rm -rf /" in the post install script, they won't add it to the Arch Linux repositories. If/when you find a 3rd-party Arch package for download, that's a risk you are going to have to take. Check the scripts, check the source of the program (if you're paranoid). That's about all you can do.
what about a check (in pacman), to give warning, that something will be done with / ... as i know, there is no line to run with / as parameter for a normal reason during an installation or upgrade
if you download a non-archlinux.org package (downloaded from somewhere else), the install procedure is now this:
> pacman -A bad-0.1-1.pkg.tar.gz
loading package data... done.
checking for conflicts... done.
installing ... done.
>
the check would look like this:
> pacman -A bad-0.1-1.pkg.tar.gz
loading package data... done.
checking install/upgrade scripts ...
Warning: Found lines in Install-Script that contain / :
line 3: do something
line 4: cd / <---
line 5: rm -rf *
line 6: echo "I was a bad script"
Continue with installation [y|N] y
checking for conflicts... done.
installing ... done.
I was a bad script
>
this will at least give the user a chance to look at code that contain "/ " in the install/upgrade/remove-scripts and have some control
of course this will not check the package-content :-( ... but at least you will have one leak closed particulary -
Pacman: unrecognized option '--sysupgrade#' [SOLVED]
Hi Guys,
I have just completed a fresh install of Arch and I love it. I do seem to have one wrinkle in build however...
Everytime I shut down, a bunch of pacman messages are displayed during the shutdown sequence?
pacman: unrecognized option '--sysupgrade#'
Does anyone know how to remove/fix this?
Kind regards,
Stonie.
Last edited by Stonie (2010-11-30 01:23:28)I don't think all think all of the messages will be logged. everything.log will have some shutdown related messages.
At what point in the shutdown sequence does the message occur?
Alternatively it may be displaying a message from startup. If you switch to tty1 whilst logged in is the message already displayed?
Check rc.conf and rc.local for anything that may have been added which could cause this.
Also, check your .bashrc. -
INSTALL ARCHLINUX (new installation system by Arch Install Script)
After many failed installations, I've resolved and written a mini-guide how to do an easy installation of Arch Linux. I've added it to Manualinux on point 44b.
However, I report it below, maybe could be useful to someone:
44b)INSTALL ARCHLINUX (new installation system by Arch Install Scripts)
Choice if install ArchLinux 32 or 64 bit, following type these commands:
-loadkeys it (choice your language)
-Use cfdisk to create your partitions
cfdisk /dev/sda o /dev/sdx
-Format Partitions Using mkfs and Create Swap
mkfs.reiserfs /dev/sda1
or
mkfs.ext4 /dev/sda1
mkswap /dev/sda2
-Reboot system with installation cd
reboot
-Mount Partition:
cd /
mount /dev/sda1 /mnt
-Make and mount swap partition:
swapon /dev/sda2
-Active wireless or ethernet connection
wifi-menu (choice your wireless connection, I suggest your to disable temporarely your password on router-modem)
dhcpcd (attach ethernet wire)
-Install Base System:
pacstrap /mnt base base-devel
-Install Grub2:
pacstrap /mnt grub-bios
-Install Syslinux:
pacstrap /mnt syslinux
-Generate fstab:
genfstab -p /mnt >> /mnt/etc/fstab
-Login to arch-chroot:
arch-chroot /mnt
-Install package wifi-select
ip link set wlan0 up
pacman -S wifi-select
-Configure Network:
vi /etc/rc.conf
add interface="eth0"
add interface="wlan0"
-Edit Hostname:
vi /etc/hostname
and add desired hostname
-Set Timezone:
ln -s /usr/share/zoneinfo/Europe/Rome /etc/localtime
-Generate Locale:
vi /etc/locale.gen
enable:
it_IT.UTF-8 UTF-8
it_IT ISO-8859-1
it_IT@euro ISO-8859-15
-Execute locale-gen on shell:
locale-gen
-Configure Kernel:
mkinitcpio -p linux
-Configure Bootloader:
grub-mkconfig -o /boot/grub/grub.cfg
grub-install --recheck /dev/sda
-Set root password:
passwd root
-Exit from arch-chroot:
exit
-Unmount Partition:
umount /mnt
-Reboot your system
reboot
-If ethernet wire is attached:
dhcpcd
-If you want configure wireless network:
ip link set wlan0 up
wifi-select (if you have not password on router-modem)
pacman -Syu kde wicd wicd-gtk (insert kdm wicd in /etc/rc.conf)
reboot system and configure your router wireless/wifi connection
Reinsert wireless password on your router/modem
Last edited by Pantera (2012-09-17 20:14:31)You don't need to install both grub and syslinux. You configure grub in "Configure Bootloader" so this step is unnecessary:
-Install Syslinux:
pacstrap /mnt syslinux
This next step doesn't configure the kernel, it creates an initramfs (see the Beginners' Guide):
-Configure Kernel:
mkinitcpio -p linux
Last edited by 2ManyDogs (2012-09-17 20:28:58) -
Install script is not executed during installation of homemade package
I'm working on my first PKGBUILD for the AUR, trying to create a package to install dphys-swapfile on Arch.
Here are the files that I'm using to create this package:
PKGBUILD
dphys-swapfile.install
dphys-swapfile.service
The installation of dphys-swapfile as specified in the PKGBUILD works perfectly, i.e. it is actually installed to the right location and you can use it without any problems at all.
The systemd unit file is copied to the right location as well and you can enable and start the service with systemctl.
The problem arises with the install script. I wrote dphys-swapfile.install so that the service would be automatically enabled and started right after the installation of the package, but this is not working, i.e. the service is neither being enabled not being started, and I don't know what is causing this issue.
Any insight on what could be failing, as well as general tips on how to improve this package, will be very much appreciated.
Last edited by jonancm (2015-02-14 22:13:38)It looks like presets are the appropriate way to do this:
systemctl preset is used by the post install scriptlets of RPM packages (or other OS package formats), to enable/disable specific units by default on package installation...
Maybe you are looking for
-
ORA-01555: snapshot too old / set transaction
Hello, When I execute a query in a script I have the following error: ORA-01555: snapshot too old... At the beginning of the script I have SET TRANSACTION use rollback segment XX. On the other hand I used SET TRANSACTION READ ONLY and I had no errors
-
How can i create a 2D vector??
Hi, I am doing a client-server application which is simliar to ICQ. And now i want to create a 2D vector. i tried: Vector [] [] v=new Vector();but it doesn't work, i want to place the loginID and IP address of clients into a vector and send this vect
-
Images not importing from Word doc
SORRY MODS - Accidently posted this in the HTML Help forum I'm having trouble getting my images placed in a Word document to import ito my project. I have RoboHelp 2002 and first experienced the problem there, thought I'd try the upgrade to see if th
-
Why do we delete setup tables?
Hi Experts, While doing Standard LO extraction why do we delete setup tables? Do we delete even for delta loads? Thanks in advance, Raj
-
HT1222 how can i change the old owners keychain password into mine
how can i change an old owners keychain password into mine so i can update software