Skip to content

Commit b98e2b1

Browse files
committed
Remove CentOS-specific code and assets
CentOS stemcells are no longer built, so this drops dead stages, assets, and code paths. Also removes the default_su_directive override (already removed on ubuntu-noble), which silently overrode the correct 'su root syslog' set globally in ubuntu-logrotate.conf.
1 parent 8c989bc commit b98e2b1

12 files changed

Lines changed: 10 additions & 138 deletions

File tree

bosh-stemcell/lib/shellout_types/service.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def check_service_enabled(runlevel)
2727
stdout, stderr, status = @chroot.run("cat", "/etc/*release")
2828
raise stderr.to_s if status != 0
2929

30-
raise "Cannot determine Linux distribution: #{stdout}" unless /Ubuntu|CentOS|openSUSE/.match?(stdout)
30+
raise "Cannot determine Linux distribution: #{stdout}" unless /Ubuntu|openSUSE/.match?(stdout)
3131

3232
check_is_enabled_systemctl
3333
end

bosh-stemcell/spec/support/stemcell_shared_examples.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,5 @@
160160
end
161161
end
162162
end
163-
164-
describe "default su directive" do
165-
describe file("/etc/logrotate.d/default_su_directive") do
166-
it "does `su root root` after any leading comments" do
167-
expect(subject.content).to match(/\A(#.*\n)*su root root\Z/)
168-
end
169-
end
170-
end
171163
end
172164
end

stemcell_builder/stages/bosh_audit_centos/apply.sh

Lines changed: 0 additions & 32 deletions
This file was deleted.

stemcell_builder/stages/image_install_grub/apply.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ add_on_exit "umount ${image_mount_point}"
3737
# == Guide to variables in this script (all paths are defined relative to the real root dir, not the chroot)
3838

3939
# work: the base working directory outside the chroot
40-
# eg: /mnt/stemcells/aws/xen/centos/work/work
40+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work
4141
# disk_image: path to the stemcell disk image
42-
# eg: /mnt/stemcells/aws/xen/centos/work/work/aws-xen-centos.raw
42+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/aws-xen-ubuntu.raw
4343
# device: path to the loopback devide mapped to the entire disk image
4444
# eg: /dev/loop0
4545
# loopback_dev: device node mapped to the main partition in disk_image
4646
# eg: /dev/mapper/loop0p1
4747
# image_mount_point: place where loopback_dev is mounted as a filesystem
48-
# eg: /mnt/stemcells/aws/xen/centos/work/work/mnt
48+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/mnt
4949

5050
# Generate random password
5151
random_password=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16)

stemcell_builder/stages/image_install_grub_efi/apply.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,17 +38,17 @@ add_on_exit "umount ${image_mount_point}/boot/efi"
3838
# == Guide to variables in this script (all paths are defined relative to the real root dir, not the chroot)
3939

4040
# work: the base working directory outside the chroot
41-
# eg: /mnt/stemcells/aws/xen/centos/work/work
41+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work
4242
# disk_image: path to the stemcell disk image
43-
# eg: /mnt/stemcells/aws/xen/centos/work/work/aws-xen-centos.raw
43+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/aws-xen-ubuntu.raw
4444
# device: path to the loopback devide mapped to the entire disk image
4545
# eg: /dev/loop0
4646
# loopback_efi_dev: device node mapped to the EFI boot ("/boot/efi") partition in disk_image
4747
# eg: /dev/mapper/loop0p1
4848
# loopback_root_dev: device node mapped to the root partition ("/") in disk_image
4949
# eg: /dev/mapper/loop0p2
5050
# image_mount_point: place where loopback_dev is mounted as a filesystem
51-
# eg: /mnt/stemcells/aws/xen/centos/work/work/mnt
51+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/mnt
5252

5353
# Generate random password
5454
random_password=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16)

stemcell_builder/stages/image_install_grub_softlayer_two_partitions/apply.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ add_on_exit "umount ${image_mount_point}/boot"
4242
# == Guide to variables in this script (all paths are defined relative to the real root dir, not the chroot)
4343

4444
# work: the base working directory outside the chroot
45-
# eg: /mnt/stemcells/aws/xen/centos/work/work
45+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work
4646
# disk_image: path to the stemcell disk image
47-
# eg: /mnt/stemcells/aws/xen/centos/work/work/aws-xen-centos.raw
47+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/aws-xen-ubuntu.raw
4848
# device: path to the loopback devide mapped to the entire disk image
4949
# eg: /dev/loop0
5050
# loopback_dev: device node mapped to the main partition in disk_image
5151
# eg: /dev/mapper/loop0p1
5252
# image_mount_point: place where loopback_dev is mounted as a filesystem
53-
# eg: /mnt/stemcells/aws/xen/centos/work/work/mnt
53+
# eg: /mnt/stemcells/aws/xen/ubuntu/work/work/mnt
5454

5555
# Generate random password
5656
random_password=$(tr -dc A-Za-z0-9_ < /dev/urandom | head -c 16)

stemcell_builder/stages/logrotate_config/apply.sh

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,10 @@ install_logrotate_cron_script() {
3232
sed -i -e 's/^\s*\(\/usr\/sbin\/logrotate\)\b/nice -n 19 ionice -c3 \1/' "$chroot/usr/bin/logrotate-cron"
3333
}
3434

35-
install_default_su_directive() {
36-
cp -f "$assets_dir/default_su_directive" "$chroot/etc/logrotate.d/default_su_directive"
37-
}
38-
3935
install_logrotate_conf
4036
install_setup_logrotate_script
4137
seed_default_logrotate_cronjob
4238
install_logrotate_cron_script
43-
install_default_su_directive
4439

4540
## TODO: either remove /etc/logrotate.d/{wtmp,btmp}
4641
## or remove it from logrotate.conf and copy over the default created wtmp,btmp files

stemcell_builder/stages/logrotate_config/assets/centos-logrotate.conf

Lines changed: 0 additions & 58 deletions
This file was deleted.

stemcell_builder/stages/logrotate_config/assets/default_su_directive

Lines changed: 0 additions & 5 deletions
This file was deleted.

stemcell_builder/stages/password_policies/assets/centos/password-auth.patch

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)