Skip to content

Commit

Permalink
Merged branch x-server into master
Browse files Browse the repository at this point in the history
  • Loading branch information
abhi1693 committed Jan 23, 2016
2 parents d678f4a + 20ba9d8 commit 4d49e53
Show file tree
Hide file tree
Showing 65 changed files with 2,851 additions and 49 deletions.
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,53 @@ bash configure.sh
Username: root
Password: temppwd
```

## System Requirements

- Minimum `10 GB` hard disk with `ext4` filesystem
- Minimum `4 GB` RAM
- Currently only compatible with `AMD Raedon` and `Intel Graphics` chipsets.
- Works only on `64-Bit` systems

## Bug tracker

Have a bug or a feature request? [Please open a new issue](https://github.com/PandaLinux/pandaOS/issues/new). Before opening any issue, please search for existing issues.

## Contribute

Read our [Contributing Guidelines](Contributing.md) for more information.
Read our [Contributing Guidelines](Contributing.md) for more information. Thanks

## Authors

Abhimanyu Saharan
- [desk.abhimanyu@gmail.com](mailto:desk.abhimanyu@gmail.com)

## Donate

Buy us a cup of coffee.

[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZJDFMDKR9X6P8)
[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=ZJDFMDKR9X6P8)

## Copyright and license

The MIT License (MIT)

Copyright (c) 2016 Panda Linux

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
15 changes: 2 additions & 13 deletions common/functions.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
#!/bin/sh

function disable_color() {
COLOR_RED=''
COLOR_GREEN=''
COLOR_YELLOW=''
COLOR_BLUE=''
COLOR_BOLD_RED=''
COLOR_BOLD_GREEN=''
COLOR_BOLD_YELLOW=''
COLOR_BOLD_BLUE=''
COLOR_RESET=''
}

# Safely mount the filesystems
function mountFs() {
echo " "
Expand All @@ -28,6 +16,7 @@ function umountFs() {
echo " "
sudo umount -l "$FILESYSTEM" && echo "$FILESYSTEM is now unmounted" || echo "Unable to unmount $FILESYSTEM"
echo " "
sudo rm -rfv "${MOUNT_POINT}"
echo "ALL DONE!"
echo " "
}
Expand Down Expand Up @@ -91,4 +80,4 @@ function enterChroot() {
# Update Grub
function updateGrub() {
sudo /usr/sbin/update-grub
}
}
12 changes: 1 addition & 11 deletions common/vars.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,4 @@
# # # # # # # # # # # # # # # # # # # # # # # # # #

FILESYSTEM=""
MOUNT_POINT=""

COLOR_RED='\e[0;31m'
COLOR_GREEN='\e[0;32m'
COLOR_YELLOW='\e[0;33m'
COLOR_BLUE='\e[0;34m'
COLOR_BOLD_RED='\e[1;31m'
COLOR_BOLD_GREEN='\e[1;32m'
COLOR_BOLD_YELLOW='\e[1;33m'
COLOR_BOLD_BLUE='\e[1;34m'
COLOR_RESET='\e[0m'
MOUNT_POINT="/mnt/panda-linux"
35 changes: 17 additions & 18 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ configureInstall() {
# Remove /tools
sudo rm -rf /tools
# Remove old .config file
rm -f "${PWD}/config"
rm -f "${PWD}/.config"
# Create new .config
cat > "${PWD}/config" << "EOF"
cat > "${PWD}/.config" << "EOF"
#!/bin/sh
EOF

Expand All @@ -32,50 +32,49 @@ EOF
esac
done

echo -e "Moint Point: "
read MOUNT_POINT
echo "export MOUNT_POINT=${MOUNT_POINT}" >> "${PWD}/config"
echo "export MOUNT_POINT=${MOUNT_POINT}" >> "${PWD}/.config"

echo -e "Filesystem: "
read FILESYSTEM
echo "export FILE_SYSTEM=${FILESYSTEM}" >> "${PWD}/config"
echo "export FILE_SYSTEM=${FILESYSTEM}" >> "${PWD}/.config"

echo -e "Turn on checks?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo 'export MAKE_CHECK=TRUE' >> "${PWD}/config";break;;
No ) echo 'export MAKE_CHECK=FALSE' >> "${PWD}/config";break;;
Yes ) echo 'export MAKE_CHECK=TRUE' >> "${PWD}/.config";break;;
No ) echo 'export MAKE_CHECK=FALSE' >> "${PWD}/.config";break;;
esac
done

echo -e "Turn on parallelism?"
select yn in "Yes" "No"; do
case $yn in
Yes ) echo 'export MAKE_PARALLEL="-j$(cat /proc/cpuinfo | grep processor | wc -l)"' >> "${PWD}/config";break;;
No ) echo 'export MAKE_PARALLEL=-j1' >> "${PWD}/config";break;;
Yes ) echo 'export MAKE_PARALLEL="-j$(cat /proc/cpuinfo | grep processor | wc -l)"' >> "${PWD}/.config";break;;
No ) echo 'export MAKE_PARALLEL=-j1' >> "${PWD}/.config";break;;
esac
done

echo 'export TARGET="$(uname -m)-panda-linux-gnu"' >> "${PWD}/config"
echo 'export PATH=/tools/bin:/bin:/usr/bin' >> "${PWD}/config"
echo 'export LC_ALL=POSIX' >> "${PWD}/config"
echo 'export VM_LINUZ=vmlinuz-4.2-systemd' >> "${PWD}/config"
echo 'export SYSTEM_MAP=System.map-4.2' >> "${PWD}/config"
echo 'export CONFIG_BACKUP=config-4.2' >> "${PWD}/config"
echo 'export TARGET="$(uname -m)-panda-linux-gnu"' >> "${PWD}/.config"
echo 'export PATH=/tools/bin:/bin:/usr/bin' >> "${PWD}/.config"
echo 'export LC_ALL=POSIX' >> "${PWD}/.config"
echo 'export VM_LINUZ=vmlinuz-4.2-systemd' >> "${PWD}/.config"
echo 'export SYSTEM_MAP=System.map-4.2' >> "${PWD}/.config"
echo 'export CONFIG_BACKUP=config-4.2' >> "${PWD}/.config"

# Make all the configurations available
source "${PWD}/config"
source "${PWD}/.config"
# Mount the filesystem
mountFs

# Copy the data
cp -ur ./* "${MOUNT_POINT}"
cp -ur "${PWD}"/.config "${MOUNT_POINT}"
# Create /tools
mkdir "${MOUNT_POINT}/tools"
sudo ln -s "${MOUNT_POINT}/tools" /

# Start Installations
for i in {1..3}
for i in {1..4}
do
cd "$MOUNT_POINT/phase${i}" && bash init.sh
done
Expand Down
43 changes: 43 additions & 0 deletions md5sums
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,46 @@ a5dd3c57fca254935f5cf8db26e39065 libksba-1.3.3.tar.bz2
6290e750ee87be3bfd9579fc44c6a186 libassuan-2.2.1.tar.bz2
55439c4436b59573a29e144916ee5b61 pinentry-0.9.5.tar.bz2
226bac7374b9466c6ec26b1c34dab844 npth-1.2.tar.bz2
1cf984125e75f8204938d998a8b6c1e1 util-macros-1.19.0.tar.bz2
685f8abbffa6d145c0f930f00703b21b libXau-1.0.8.tar.bz2
18aa5c1279b01f9d18e3299969665b2e libXdmcp-1.1.2.tar.bz2
6bf2797445dc6d43e9e4707c082eff9c xcb-proto-1.11.tar.bz2
d149d2812f10cbe04c042232e7964171 Python-3.5.0.tar.xz
83b89587607e3eb65c70d361f13bab43 libffi-3.2.1.tar.gz
5bda2cdb1af51a80aecce58d6e42bd2f dejagnu-1.5.3.tar.gz
44e1a4f4c877e9ddc5a542dfa7ecc92b expect5.45.tar.gz
d7cbb91f1ded1919370a30edd1534304 tcl8.6.4-src.tar.gz
62647d87e9244a4d521c6547e097007c tcl8.6.4-html.tar.gz
9e6a9aca9d155737868b3dc5fd82f788 libxml2-2.9.2.tar.gz
f97a65e6158775de518ac391935634c2 libxcb-1.11.1.tar.bz2
53c5e5c77d090e103a17f3ed7fd7d8b8 check-0.10.0.tar.gz
35cb8f4d9e5906847901bb39324c2f80 freetype-2.6.1.tar.bz2
1223cefac2bc77298ff5c7422bb148d5 harfbuzz-1.1.0.tar.bz2
824d000eb737af6e16c826dd3b2d6c90 fontconfig-2.11.1.tar.bz2
2e97feed81919465a04ccc71e4073313 xcb-util-0.4.0.tar.bz2
08fe8ffecc8d4e37c0ade7906b3f4c87 xcb-util-image-0.4.0.tar.bz2
1022293083eec9e62d5659261c29e367 xcb-util-keysyms-0.4.0.tar.bz2
468b119c94da910e1291f3ffab91019a xcb-util-renderutil-0.3.9.tar.bz2
87b19a1cd7bfcb65a24e36c300e03129 xcb-util-wm-0.4.1.tar.bz2
2b3369d64481c1f72ce2d88f7acdb0fb mesa-11.0.2.tar.bz2
543b2d28359ef33974fa0e772dd61732 libdrm-2.4.65.tar.bz2
2e4536c1c48034f188a80789a59114d8 elfutils-0.164.tar.bz2
b98b9495e5655a672dbcb83e1a180f8e llvm-3.7.0.src.tar.xz
7444bbbd999b53bec6a60608a5301f4c xbitmaps-1.1.1.tar.bz2
1e6a458429e850fc93c1f3b6dc00a48f libpng-1.6.19.tar.xz
fdfb0ad9cfceed60e3bfe9f18765aa0d xcursor-themes-1.0.4.tar.bz2
4af1deeb7c5f4cad62e65957d98d6758 xkeyboard-config-2.15.tar.bz2
397e405566651150490ff493e463f1ad xorg-server-1.17.2.tar.bz2
ace78aec799b1cf6dfaea55d3879ed9f libpciaccess-0.13.4.tar.bz2
e588622e375e7d578e9df320f1ace2de pixman-0.32.8.tar.gz
96f6620a9b005a503e7b44b0b528287d libepoxy-1.3.1.tar.bz2
9dc53067556d2dd567808fd509529dd6 Linux-PAM-1.2.1.tar.bz2
99eebf171e6c7bffc42d4fc430d47454 xf86-input-evdev-2.9.2.tar.bz2
b66443bb664cfaf2ba7b3f8c238ea951 libevdev-1.4.4.tar.xz
29654190e37310b87e44a14c229967ee xf86-video-ati-7.5.0.tar.bz2
fa196a66e52c0c624fe5d350af7a5e7b xf86-video-intel-2.99.917.tar.bz2
59a6f076cdacb5f6945dac809bcf4906 twm-1.0.9.tar.bz2
0d7f0e6390d132ae59876b3870e5785d xterm-320.tgz
4e928452dfaf73851413a2d8b8c76388 xinit-1.3.4.tar.bz2
c685ef0b8e9f27b5e3db5db12b268ac6 Python-2.7.10.tar.xz
5f07d5079327be83f450ecc459ffe249 python-2.7.10-docs-html.tar.bz2
6 changes: 3 additions & 3 deletions phase2/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set +h # disable hashall
shopt -s -o pipefail

source "$MOUNT_POINT/common/functions.sh"
echo 'export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin' >> "$MOUNT_POINT/config"
echo 'export PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin' >> "$MOUNT_POINT/.config"

mkdir -pv $MOUNT_POINT/{dev,proc,sys,run}

Expand All @@ -19,10 +19,10 @@ for i in ${_list[@]}; do
echo "${i} --> Already Built"
else
echo "Building---> ${i}"
enterChrootTmp "source config && cd /phase2/$i && (bash build.sh |& tee build.log ) || false"
enterChrootTmp "source /.config && cd /phase2/$i && (bash build.sh |& tee build.log ) || false"
echo "Build ---> ${i} completed"
touch DONE
fi
popd;;
esac
done
done
4 changes: 2 additions & 2 deletions phase3/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ shopt -s -o pipefail

source "$MOUNT_POINT/common/functions.sh"

_list=(bash network clock inputrc shell fstab linux-kernel grub lsb lsb-release sudo dpkg unzip openssl wget cert curl libgpg-error libksba libgcrypt libassuan pth pin-entry npth gnupg apt)
_list=(bash network clock inputrc shell fstab linux-kernel grub lsb lsb-release linux-pam shadow sudo dpkg unzip openssl wget cert curl libgpg-error libksba libgcrypt libassuan pth pin-entry npth gnupg apt)

for i in ${_list[@]}; do
case $i in
Expand All @@ -16,7 +16,7 @@ for i in ${_list[@]}; do
echo "${i} --> Already Built"
else
echo "Building---> ${i}"
enterChroot "source config && cd /phase3/$i && (bash build.sh |& tee build.log ) || false"
enterChroot "source /.config && cd /phase3/$i && (bash build.sh |& tee build.log ) || false"
echo "Build ---> ${i} completed"
touch DONE
fi
Expand Down
7 changes: 7 additions & 0 deletions phase3/linux-pam/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.tar.*
*.zip
*.log
*~
*.*~
.*~
DONE
110 changes: 110 additions & 0 deletions phase3/linux-pam/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
#!/bin/sh

set +h # disable hashall
shopt -s -o pipefail

PKG_NAME="Linux-PAM"
PKG_VERSION="1.2.1"

TARBALL="${PKG_NAME}-${PKG_VERSION}.tar.bz2"
SRC_DIR="${PKG_NAME}-${PKG_VERSION}"

function prepare() {
if [[ ! -f "${TARBALL}" ]]
then
ln -sv "/source/$TARBALL" "$TARBALL"
fi
}

function unpack() {
tar xf ${TARBALL}
}

function build() {
./configure --prefix=/usr \
--sysconfdir=/etc \
--libdir=/usr/lib \
--enable-securedir=/lib/security &&
make $MAKE_PARALLEL

install -v -dm755 /etc/pam.d &&
cat > /etc/pam.d/other << "EOF"
auth required pam_deny.so
account required pam_deny.so
password required pam_deny.so
session required pam_deny.so
EOF
}

function check() {
make $MAKE_PARALLEL check
}

function instal() {
rm -rfv /etc/pam.d

make $MAKE_PARALLEL install &&
chmod -v 4755 /sbin/unix_chkpwd &&

for file in pam pam_misc pamc
do
mv -v /usr/lib/lib${file}.so.* /lib &&
ln -sfv ../../../lib/$(readlink /usr/lib/lib${file}.so) /usr/lib/lib${file}.so
done

install -v -dm755 /etc/pam.d
cat > /etc/pam.d/system-account << "EOF"
# Begin /etc/pam.d/system-account
account required pam_unix.so
# End /etc/pam.d/system-account
EOF

cat > /etc/pam.d/system-auth << "EOF"
# Begin /etc/pam.d/system-auth
auth required pam_unix.so
# End /etc/pam.d/system-auth
EOF

cat > /etc/pam.d/system-session << "EOF"
# Begin /etc/pam.d/system-session
session required pam_unix.so
# End /etc/pam.d/system-session
EOF

cat > /etc/pam.d/system-password << "EOF"
# Begin /etc/pam.d/system-password
# use sha512 hash for encryption, use shadow, and try to use any previously
# defined authentication token (chosen password) set by any prior module
password required pam_unix.so sha512 shadow try_first_pass
# End /etc/pam.d/system-password
EOF

cat > /etc/pam.d/other << "EOF"
# Begin /etc/pam.d/other
auth required pam_warn.so
auth required pam_deny.so
account required pam_warn.so
account required pam_deny.so
password required pam_warn.so
password required pam_deny.so
session required pam_warn.so
session required pam_deny.so
# End /etc/pam.d/other
EOF
}

function clean() {
rm -rf "${SRC_DIR}"
}

clean;prepare;unpack;pushd ${SRC_DIR};build;[[ $MAKE_CHECK = TRUE ]] && check;instal;popd;clean
7 changes: 7 additions & 0 deletions phase3/shadow/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
*.tar.*
*.zip
*.log
*~
*.*~
.*~
DONE
Loading

0 comments on commit 4d49e53

Please sign in to comment.