Skip to content

Commit

Permalink
rimosse compretamente dipendenze da pxelinux ed isolinux
Browse files Browse the repository at this point in the history
  • Loading branch information
pieroproietti committed Oct 21, 2024
1 parent 91bd8bf commit 77b7a72
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 76 deletions.
1 change: 0 additions & 1 deletion DOCS/WAY-TO-DEBIAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ sudo apt install \
dosfstools \
dpkg-dev \
git \
isolinux \
jq \
live-boot \
live-boot-doc \
Expand Down
2 changes: 0 additions & 2 deletions PREREQUISITES/debian/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ apt-get install -y \
dpkg-dev \
git \
grub-efi-amd64-bin \
isolinux \
jq \
live-boot \
live-boot-doc \
Expand All @@ -33,7 +32,6 @@ apt-get install -y \
nodejs \
npm \
parted \
pxelinux \
rsync \
squashfs-tools \
sshfs \
Expand Down
2 changes: 0 additions & 2 deletions PREREQUISITES/devuan/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ apt-get install -y \
dpkg-dev \
git \
grub-efi-amd64-bin \
isolinux \
jq \
live-boot \
live-boot-doc \
Expand All @@ -33,7 +32,6 @@ apt-get install -y \
nodejs \
npm \
parted \
pxelinux \
rsync \
squashfs-tools \
sshfs \
Expand Down
2 changes: 0 additions & 2 deletions PREREQUISITES/ubuntu/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ apt-get install -y \
dosfstools \
dpkg-dev \
git \
isolinux \
jq \
live-boot \
live-boot-doc \
Expand All @@ -32,7 +31,6 @@ apt-get install -y \
nodejs \
npm \
parted \
pxelinux \
rsync \
squashfs-tools \
sshfs \
Expand Down
2 changes: 1 addition & 1 deletion install-eggs-dev
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fi
# build
pnpm build
xdg-user-dirs-update --force
$SUDO cp scripts/eggs.bash /etc/bash_completion.d/eggs
$SUDO cp scripts/eggs.bash /usr/share/bash-completion/completions/
$SUDO cp g4/* /usr/local/bin
$SUDO cp assets/eggs.png /usr/share/icons/
$SUDO mkdir -p /usr/share/man/man1
Expand Down
2 changes: 0 additions & 2 deletions perrisbrewery/template/dependencies-bionic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ common:
- dosfstools # eggs
- dpkg-dev # yolk
- git # wardrobe
- isolinux # eggs
- jq # mom
- live-boot # eggs
- live-boot-doc # eggs
Expand All @@ -20,7 +19,6 @@ common:
- nodejs (>= 16)
- live-boot # questo va reinstallato
- parted
- pxelinux # cuckoo
- rsync
- squashfs-tools
- sshfs # eggs
Expand Down
2 changes: 0 additions & 2 deletions perrisbrewery/template/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ common:
- dosfstools # eggs
- dpkg-dev # yolk
- git # wardrobe
- isolinux # eggs
- jq # mom
- live-boot # eggs
- live-boot-doc # eggs
Expand All @@ -20,7 +19,6 @@ common:
- lvm2 # pvdisplay in krill
- nodejs (>= 18)
- parted
- pxelinux # cuckoo
- rsync
- squashfs-tools
- sshfs # eggs
Expand Down
41 changes: 0 additions & 41 deletions src/classes/n8.ts

This file was deleted.

16 changes: 7 additions & 9 deletions src/classes/ovary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import Bleach from './bleach.js'
import CliAutologin from './cli-autologin.js'
import { displaymanager } from './incubation/fisherman-helper/displaymanager.js'
import Incubator from './incubation/incubator.js'
import N8 from './n8.js'
import Pacman from './pacman.js'
import PveLive from './pve-live.js'
import Settings from './settings.js'
Expand Down Expand Up @@ -129,7 +128,7 @@ export default class Ovary {

for (const dir of dirs) {
cmds.push(startLine)
if (N8.isDirectory(dir)) {
if (fs.statSync(`/${dir}`).isDirectory()) {
if (dir === 'boot') {
cmds.push(`# /boot is copied actually`)
cmds.push(await rexec(`cp -r /boot ${this.settings.config.snapshot_mnt}filesystem.squashfs`, this.verbose))
Expand Down Expand Up @@ -165,14 +164,14 @@ export default class Ovary {
cmds.push(await makeIfNotExist(`${this.settings.work_dir.merged}/${dir}`, this.verbose), `# mount -o bind /${dir} ${this.settings.work_dir.merged}/${dir}`)
}
}
} else if (N8.isFile(dir)) {
} else if (fs.statSync(`/${dir}`).isFile()) {
cmds.push(`# /${dir} is just a file`, titleLine)
if (fs.existsSync(`${this.settings.work_dir.merged}/${dir}`)) {
cmds.push('# file exist... skip')
} else {
cmds.push(await rexec(`cp /${dir} ${this.settings.work_dir.merged}`, this.verbose))
}
} else if (N8.isSymbolicLink(dir)) {
} else if (fs.statSync(`/${dir}`).isSymbolicLink()) {
lnkDest = fs.readlinkSync(`/${dir}`)
cmds.push(
`# /${dir} is a symbolic link to /${lnkDest} in the system`,
Expand Down Expand Up @@ -1909,10 +1908,9 @@ export default class Ovary {
})

for (const dir of bindDirs) {
const dirname = N8.dirent2string(dir)

const dirname = dir.name
cmds.push('#############################################################')
if (N8.isDirectory(dirname)) {
if (fs.statSync(`/${dirname}`).isDirectory()) {
cmds.push(`\n# directory: ${dirname}`)
if (this.mergedAndOverlay(dirname)) {
cmds.push(`\n# ${dirname} has overlay`, `\n# First, umount it from ${this.settings.config.snapshot_dir}`)
Expand All @@ -1932,10 +1930,10 @@ export default class Ovary {
// We can't remove first level nest
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname} -rf`, this.verbose))
}
} else if (N8.isFile(dirname)) {
} else if (fs.statSync(`/${dirname}`).isFile()) {
cmds.push(`\n# ${dirname} = file`)
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname}`, this.verbose))
} else if (N8.isSymbolicLink(dirname)) {
} else if (fs.statSync(`/${dirname}`).isSymbolicLink()) {
cmds.push(`\n# ${dirname} = symbolicLink`)
cmds.push(await rexec(`rm ${this.settings.work_dir.merged}/${dirname}`, this.verbose))
}
Expand Down
20 changes: 8 additions & 12 deletions src/classes/pacman.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,12 @@ export default class Pacman {
* @param verbose
*/
static async autocompleteInstall(verbose = false) {
if (this.distro().familyId === 'debian') {
if (Pacman.packageIsInstalled('bash-completion')) {
if (fs.existsSync('/usr/share/bash-completion/completions/')) {
await exec(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`)
} else if (fs.existsSync('/etc/bash_completion.d/')) {
await exec(`cp ${__dirname}/../../scripts/eggs.bash /etc/bash_completion.d/`)
}
if (Pacman.packageIsInstalled('bash-completion')) {
if (fs.existsSync('/usr/share/bash-completion/completions/')) {
await exec(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`)
} else if (fs.existsSync('/etc/bash_completion.d/')) {
await exec(`cp ${__dirname}/../../scripts/eggs.bash /etc/bash_completion.d/`)
}
} else if (this.distro().familyId === 'archlinux' && Pacman.packageIsInstalled('bash-completion')) {
await exec(`cp ${__dirname}/../../scripts/eggs.bash /usr/share/bash-completion/completions/`)
}
}

Expand All @@ -75,7 +71,7 @@ export default class Pacman {
} else if (this.distro().familyId === 'fedora') {
await Fedora.calamaresInstall(verbose)
} else if (this.distro().familyId === 'archlinux') {
if (this.distro().distroId === 'ManjaroLinux' || this.distro().distroId === 'BigLinux' ) {
if (this.distro().distroId === 'ManjaroLinux' || this.distro().distroId === 'BigLinux') {
const cmd = `pacman -Sy --noconfirm calamares`
try {
await exec(cmd, Utils.setEcho(true))
Expand Down Expand Up @@ -398,7 +394,7 @@ export default class Pacman {
const dest = '/etc/penguins-eggs.d/distros/excalibur'
await exec(`cp -r ${buster}/calamares ${dest}/calamares`, echo)


/***********************************************************************************
* Ubuntu
**********************************************************************************/
Expand Down Expand Up @@ -619,7 +615,7 @@ export default class Pacman {
installed = true
}
} else if (this.distro().familyId === 'opensuse') {
if (Opensuse.packageIsInstalled('xorg-x11-server')) {
if (Opensuse.packageIsInstalled('xorg-x11-server')) {
installed = true
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/classes/xdg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import shx from 'shelljs'
// libraries
import { exec } from '../lib/utils.js'
import Distro from './distro.js'
import N8 from './n8.js'
import Pacman from './pacman.js'
import Utils from './utils.js'

Expand Down Expand Up @@ -69,7 +68,8 @@ export default class Xdg {
const files = fs.readdirSync(dc)
for (const elem of files) {
const curFile = dc + elem
if (!N8.isDirectory(curFile)) {
if (!fs.statSync(`/${curFile}`).isDirectory()) {
//if (!N8.isDirectory(curFile)) {
let content = fs.readFileSync(curFile, 'utf8')
const find = '[Seat:*]'
if (content.includes(find)) {
Expand Down

0 comments on commit 77b7a72

Please sign in to comment.