Migrate util-linux-config to Debian
Modified util-linux-config to add support for Debian packaging. Note: This package should be merged after pam-config and shadow-utils-config since some referenced files are installed by those packages. Added pam-config and shadow-utils-config as Pre-Depends. Note: Included file "postlogin" on /etc/pam.d since it was referenced and not present. Test Plan: PASS: Package installed and ISO built successfully Story: 2009256 Task: 43748 Signed-off-by: Matheus Machado Guilhermino <Matheus.MachadoGuilhermino@windriver.com> Change-Id: I8e4fc7715db60b600559072cc8c09b97c8c64f22
This commit is contained in:
parent
5a15601ae0
commit
d7c2beffe0
5
util-linux-config/debian/deb_folder/changelog
Normal file
5
util-linux-config/debian/deb_folder/changelog
Normal file
@ -0,0 +1,5 @@
|
||||
util-linux-config (1.0-1) unstable; urgency=medium
|
||||
|
||||
* Initial release.
|
||||
|
||||
-- Matheus Guilhermino <matheus.machadoguilhermino@windriver.com> Mon, 25 Oct 2021 11:48:29 -0400
|
14
util-linux-config/debian/deb_folder/control
Normal file
14
util-linux-config/debian/deb_folder/control
Normal file
@ -0,0 +1,14 @@
|
||||
Source: util-linux-config
|
||||
Section: admin
|
||||
Priority: optional
|
||||
Maintainer: Starlingx Developers <starlingx-discuss@lists.starlingx.io>
|
||||
Build-Depends: debhelper-compat (= 13)
|
||||
Standards-Version: 4.4.1
|
||||
Homepage: https://www.starlingx.io
|
||||
|
||||
Package: util-linux-config
|
||||
Architecture: all
|
||||
Pre-Depends: pam-config, shadow-utils-config
|
||||
Depends: ${misc:Depends}
|
||||
Description: Package StarlingX configuration files of util-linux to system folder.
|
||||
Installs login preferences to the pam.d directory.
|
27
util-linux-config/debian/deb_folder/copyright
Normal file
27
util-linux-config/debian/deb_folder/copyright
Normal file
@ -0,0 +1,27 @@
|
||||
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: util-linux-config
|
||||
Source: https://opendev.org/starlingx/config-files/
|
||||
|
||||
Files: *
|
||||
Copyright: (c) 2013-2021 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
|
||||
Files: debian/*
|
||||
Copyright: 2021 Wind River Systems, Inc
|
||||
License: Apache-2
|
||||
|
||||
License: Apache-2
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
.
|
||||
https://www.apache.org/licenses/LICENSE-2.0
|
||||
.
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
.
|
||||
On Debian-based systems the full text of the Apache version 2.0 license
|
||||
can be found in `/usr/share/common-licenses/Apache-2.0'.
|
13
util-linux-config/debian/deb_folder/postinst
Normal file
13
util-linux-config/debian/deb_folder/postinst
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
cp /usr/share/starlingx/stx.su /etc/pam.d/su
|
||||
cp /usr/share/starlingx/stx.login /etc/pam.d/login
|
||||
cp /usr/share/starlingx/stx.postlogin /etc/pam.d/postlogin
|
||||
|
||||
chmod 644 /etc/pam.d/su
|
||||
chmod 644 /etc/pam.d/login
|
||||
chmod 644 /etc/pam.d/postlogin
|
||||
|
||||
#DEBHELPER#
|
5
util-linux-config/debian/deb_folder/rules
Normal file
5
util-linux-config/debian/deb_folder/rules
Normal file
@ -0,0 +1,5 @@
|
||||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
%:
|
||||
dh $@
|
1
util-linux-config/debian/deb_folder/source/format
Normal file
1
util-linux-config/debian/deb_folder/source/format
Normal file
@ -0,0 +1 @@
|
||||
3.0 (quilt)
|
@ -0,0 +1,3 @@
|
||||
stx.su usr/share/starlingx
|
||||
stx.login usr/share/starlingx
|
||||
stx.postlogin usr/share/starlingx
|
7
util-linux-config/debian/meta_data.yaml
Normal file
7
util-linux-config/debian/meta_data.yaml
Normal file
@ -0,0 +1,7 @@
|
||||
---
|
||||
debname: util-linux-config
|
||||
debver: 1.0-1
|
||||
src_path: source-debian
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
8
util-linux-config/files/stx.postlogin
Normal file
8
util-linux-config/files/stx.postlogin
Normal file
@ -0,0 +1,8 @@
|
||||
#%PAM-1.0
|
||||
# This file is auto-generated.
|
||||
# User changes will be destroyed the next time authconfig is run.
|
||||
|
||||
|
||||
session [success=1 default=ignore] pam_succeed_if.so service !~ gdm* service !~ su* quiet
|
||||
session [default=1] pam_lastlog.so nowtmp showfailed
|
||||
session optional pam_lastlog.so silent noupdate showfailed
|
19
util-linux-config/source-debian/stx.login
Normal file
19
util-linux-config/source-debian/stx.login
Normal file
@ -0,0 +1,19 @@
|
||||
#%PA-1.0
|
||||
auth [user_unknown=ignore success=ok ignore=ignore default=bad] pam_securetty.so
|
||||
auth substack system-auth
|
||||
auth include postlogin
|
||||
account required pam_nologin.so
|
||||
account include system-auth
|
||||
password include system-auth
|
||||
# pam_selinux.so close should be the first session rule
|
||||
session required pam_selinux.so close
|
||||
session required pam_mkhomedir.so skel=/etc/skel umask=0022
|
||||
session required pam_loginuid.so
|
||||
session optional pam_console.so
|
||||
# pam_selinux.so open should only be followed by sessions to be executed in the user context
|
||||
session required pam_selinux.so open
|
||||
session required pam_namespace.so
|
||||
session optional pam_keyinit.so force revoke
|
||||
session include system-auth
|
||||
session include postlogin
|
||||
-session optional pam_ck_connector.so
|
8
util-linux-config/source-debian/stx.postlogin
Normal file
8
util-linux-config/source-debian/stx.postlogin
Normal file
@ -0,0 +1,8 @@
|
||||
#%PAM-1.0
|
||||
# This file is auto-generated.
|
||||
# User changes will be destroyed the next time authconfig is run.
|
||||
|
||||
|
||||
session [success=1 default=ignore] pam_succeed_if.so service !~ gdm* service !~ su* quiet
|
||||
session [default=1] pam_lastlog.so nowtmp showfailed
|
||||
session optional pam_lastlog.so silent noupdate showfailed
|
69
util-linux-config/source-debian/stx.su
Normal file
69
util-linux-config/source-debian/stx.su
Normal file
@ -0,0 +1,69 @@
|
||||
#
|
||||
# The PAM configuration file for the Shadow `su' service
|
||||
#
|
||||
|
||||
# This allows root to su without passwords (normal operation)
|
||||
auth sufficient pam_rootok.so
|
||||
|
||||
# Uncomment this to force users to be a member of group root
|
||||
# before they can use `su'. You can also add "group=foo"
|
||||
# to the end of this line if you want to use a group other
|
||||
# than the default "root" (but this may have side effect of
|
||||
# denying "root" user, unless she's a member of "foo" or explicitly
|
||||
# permitted earlier by e.g. "sufficient pam_rootok.so").
|
||||
# (Replaces the `SU_WHEEL_ONLY' option from login.defs)
|
||||
# auth required pam_wheel.so
|
||||
|
||||
# Uncomment this if you want wheel members to be able to
|
||||
# su without a password.
|
||||
# auth sufficient pam_wheel.so trust
|
||||
|
||||
# Uncomment this if you want members of a specific group to not
|
||||
# be allowed to use su at all.
|
||||
# auth required pam_wheel.so deny group=nosu
|
||||
|
||||
# Uncomment and edit /etc/security/time.conf if you need to set
|
||||
# time restrainst on su usage.
|
||||
# (Replaces the `PORTTIME_CHECKS_ENAB' option from login.defs
|
||||
# as well as /etc/porttime)
|
||||
# account requisite pam_time.so
|
||||
|
||||
# This module parses environment configuration file(s)
|
||||
# and also allows you to use an extended config
|
||||
# file /etc/security/pam_env.conf.
|
||||
#
|
||||
# parsing /etc/environment needs "readenv=1"
|
||||
session required pam_env.so readenv=1
|
||||
|
||||
# Defines the MAIL environment variable
|
||||
# However, userdel also needs MAIL_DIR and MAIL_FILE variables
|
||||
# in /etc/login.defs to make sure that removing a user
|
||||
# also removes the user's mail spool file.
|
||||
# See comments in /etc/login.defs
|
||||
#
|
||||
# "nopen" stands to avoid reporting new mail when su'ing to another user
|
||||
session optional pam_mail.so nopen
|
||||
|
||||
# Sets up user limits, please uncomment and read /etc/security/limits.conf
|
||||
# to enable this functionality.
|
||||
# (Replaces the use of /etc/limits in old login)
|
||||
# session required pam_limits.so
|
||||
|
||||
# For first time login or when the user authentication
|
||||
# token stack has been flushed, su will call passwd
|
||||
# which will fails with "Authentication Token Error"
|
||||
# since the previous token on the stack is NULL
|
||||
#
|
||||
# Tickle the password service to push a previous
|
||||
# authentication token on the PAM stack
|
||||
password optional pam_ldap.so
|
||||
password optional pam_unix.so
|
||||
|
||||
# The standard Unix authentication modules, used with
|
||||
# NIS (man nsswitch) as well as normal /etc/passwd and
|
||||
# /etc/shadow entries.
|
||||
auth include common-auth
|
||||
account include common-account
|
||||
session include common-session
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user