summaryrefslogtreecommitdiffstats
path: root/recipes/initscripts
AgeCommit message (Expand)Author
2011-01-30SlugOS: initscripts - rework reboot for clean kexecMike Westerhof
2011-01-18initscripts: Switch to libc-uclibcTom Rini
2010-12-16initscripts-1.0: Add special bootmisc for bug20 to set the GPS serial port co...Stefan Schmidt
2010-10-19openmoko: move initscripts, psplash, alsa-scenarios also to obsoleteMartin Jansa
2010-10-06init-scripts: fix save-rtc error with date formatting on uclibcPetr Štetiar
2010-09-19initscripts-slugos_1.0.bb: improved FILESPATHPKGFrans Meulenbroeks
2010-09-19openprotium: fixed unpackFrans Meulenbroeks
2010-09-19initscripts : moved unused files to obsolete dirFrans Meulenbroeks
2010-08-12initscripts-slugos: Switch to FILESPATHPKG =.Tom Rini
2010-08-10initscripts: Fixed empty machine_id returned on some devices.Stanislav Brabec
2010-08-04initscripts: functions machine id xilinx virtex5 platformsAdrian Alonso
2010-06-14recipes: bump PR/INC_PR for packages changed in RDEPENDS/RRECOMMENDS/RSUGGEST...Martin Jansa
2010-06-10recipes: bump PR/INC_PR for packages changed in RDEPENDS/RRECOMMENDS/RSUGGEST...Martin Jansa
2010-06-10recipes: conform to OE packaging guidelines with RSUGGESTS/RPROVIDES/RCONFLIC...Martin Jansa
2010-06-03recipes: conform to OE packaging guidelines with RDEPENDS/RRECOMMENDSMartin Jansa
2010-05-13Revert "initscripts 1.0 : change it to MACHINE_ARCH and bump PR"Denis 'GNUtoo' Carikli
2010-05-13initscripts 1.0 : change it to MACHINE_ARCH and bump PRDenis 'GNUtoo' Carikli
2010-05-08SlugOS: initscripts-slugos - "unset" CONFFILES in order to avoidMike Westerhof
2010-04-28image.bbclass: create /etc/device_table from IMAGE_DEVICE_TABLESAntonio Ospite
2010-04-05SlugOS: initscripts-slugos - add dependency on update-rc.d-nativeMike Westerhof
2010-02-23initscripts: Make umountfs a bit more robust, bump PRTom Rini
2010-02-18initscripts: Have sysfs.sh do similar checks to rcS and bump PR.Tom Rini
2009-12-26Initscripts. Fix devices script for machine jornada6xxKristoffer Ericson
2009-09-27SlugOS: initscripts - add in the correct device_table.txt for SlugOS,Mike Westerhof
2009-07-03initscripts: correct checkroot rootfs read-write checkBrian Bloniarz
2009-06-01initscripts: Get rid of the vtmaster stuff, bump PR.Tom Rini
2009-05-30Replace obsolete base_set_filespath() with FILESPATHPKG in some recipes.Michael Smith
2009-05-27initscripts: fixed bootmisc.sh so that hwclock.sh is only called if installedMartin Dietze
2009-04-30SlugOS: slugos-image.bb, initscripts-slugos_1.0.bb - remove devfs supportMike Westerhof
2009-04-22initscripts: modifications for hipox machineSteffen Sledz
2009-03-31initscripts: set alignment to 0 for armv7aKoen Kooi
2009-03-17rename packages/ to recipes/ per earlier agreementDenys Dmytriyenko
/ .highlight .se { color: #ae81ff } /* Literal.String.Escape */ .highlight .sh { color: #e6db74 } /* Literal.String.Heredoc */ .highlight .si { color: #e6db74 } /* Literal.String.Interpol */ .highlight .sx { color: #e6db74 } /* Literal.String.Other */ .highlight .sr { color: #e6db74 } /* Literal.String.Regex */ .highlight .s1 { color: #e6db74 } /* Literal.String.Single */ .highlight .ss { color: #e6db74 } /* Literal.String.Symbol */ .highlight .bp { color: #f8f8f2 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #a6e22e } /* Name.Function.Magic */ .highlight .vc { color: #f8f8f2 } /* Name.Variable.Class */ .highlight .vg { color: #f8f8f2 } /* Name.Variable.Global */ .highlight .vi { color: #f8f8f2 } /* Name.Variable.Instance */ .highlight .vm { color: #f8f8f2 } /* Name.Variable.Magic */ .highlight .il { color: #ae81ff } /* Literal.Number.Integer.Long */ } @media (prefers-color-scheme: light) { .highlight .hll { background-color: #ffffcc } .highlight .c { color: #888888 } /* Comment */ .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */ .highlight .k { color: #008800; font-weight: bold } /* Keyword */ .highlight .ch { color: #888888 } /* Comment.Hashbang */ .highlight .cm { color: #888888 } /* Comment.Multiline */ .highlight .cp { color: #cc0000; font-weight: bold } /* Comment.Preproc */ .highlight .cpf { color: #888888 } /* Comment.PreprocFile */ .highlight .c1 { color: #888888 } /* Comment.Single */ .highlight .cs { color: #cc0000; font-weight: bold; background-color: #fff0f0 } /* Comment.Special */ .highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */ .highlight .ge { font-style: italic } /* Generic.Emph */ .highlight .gr { color: #aa0000 } /* Generic.Error */ .highlight .gh { color: #333333 } /* Generic.Heading */ .highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */ .highlight .go { color: #888888 } /* Generic.Output */ .highlight .gp { color: #555555 } /* Generic.Prompt */ .highlight .gs { font-weight: bold } /* Generic.Strong */ .highlight .gu { color: #666666 } /* Generic.Subheading */ .highlight .gt { color: #aa0000 } /* Generic.Traceback */ .highlight .kc { color: #008800; font-weight: bold } /* Keyword.Constant */ .highlight .kd { color: #008800; font-weight: bold } /* Keyword.Declaration */ .highlight .kn { color: #008800; font-weight: bold } /* Keyword.Namespace */ .highlight .kp { color: #008800 } /* Keyword.Pseudo */ .highlight .kr { color: #008800; font-weight: bold } /* Keyword.Reserved */ .highlight .kt { color: #888888; font-weight: bold } /* Keyword.Type */ .highlight .m { color: #0000DD; font-weight: bold } /* Literal.Number */ .highlight .s { color: #dd2200; background-color: #fff0f0 } /* Literal.String */ .highlight .na { color: #336699 } /* Name.Attribute */ .highlight .nb { color: #003388 } /* Name.Builtin */ .highlight .nc { color: #bb0066; font-weight: bold } /* Name.Class */ .highlight .no { color: #003366; font-weight: bold } /* Name.Constant */ .highlight .nd { color: #555555 } /* Name.Decorator */ .highlight .ne { color: #bb0066; font-weight: bold } /* Name.Exception */ .highlight .nf { color: #0066bb; font-weight: bold } /* Name.Function */ .highlight .nl { color: #336699; font-style: italic } /* Name.Label */ .highlight .nn { color: #bb0066; font-weight: bold } /* Name.Namespace */ .highlight .py { color: #336699; font-weight: bold } /* Name.Property */ .highlight .nt { color: #bb0066; font-weight: bold } /* Name.Tag */ .highlight .nv { color: #336699 } /* Name.Variable */ .highlight .ow { color: #008800 } /* Operator.Word */ .highlight .w { color: #bbbbbb } /* Text.Whitespace */ .highlight .mb { color: #0000DD; font-weight: bold } /* Literal.Number.Bin */ .highlight .mf { color: #0000DD; font-weight: bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */ }
SUMMARY = "An open source remote desktop protocol(rdp) server."

LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://COPYING;md5=72cfbe4e7bd33a0a1de9630c91195c21 \
"

inherit distro_features_check autotools pkgconfig useradd systemd

DEPENDS = "openssl virtual/libx11 libxfixes libxrandr libpam nasm-native"

REQUIRED_DISTRO_FEATURES = "x11"

SRC_URI = "git://github.com/neutrinolabs/xrdp.git \
           file://xrdp.sysconfig \
           file://0001-Fix-sesman.ini-and-xrdp.ini.patch \
           file://0001-Added-req_distinguished_name-in-etc-xrdp-openssl.con.patch \
           file://0001-Fix-the-compile-error.patch \
           file://0001-Fix-of-CVE-2017-16927.patch \
           "

SRCREV = "c295dd61b882e8b56677cf12791f43634f9190b5"

PV = "0.9.4+git${SRCPV}"

S = "${WORKDIR}/git"

USERADD_PACKAGES = "${PN}"
GROUPADD_PARAM_${PN} = "--system xrdp"
USERADD_PARAM_${PN}  = "--system --home /var/run/xrdp -g xrdp \
                        --no-create-home --shell /bin/false xrdp"

FILES_${PN} += "${datadir}/dbus-1/services/*.service \
                ${datadir}/dbus-1/accessibility-services/*.service "

FILES_${PN}-dev += "${libdir}/xrdp/libcommon.so \
                    ${libdir}/xrdp/libxrdp.so \
                    ${libdir}/xrdp/libscp.so \
                    ${libdir}/xrdp/libxrdpapi.so "

#EXTRA_OECONF = "--disable-rfxcodec --disable-painter"

do_configure_prepend() {
    cd ${S}
    ./bootstrap
    cd -
}

do_compile_prepend() {
    sed -i 's/(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am/(MAKE) $(AM_MAKEFLAGS) install-exec-am/g' ${S}/keygen/Makefile.in
}


do_install_append() {
	install -d ${D}${sysconfdir} 
	install -d ${D}${sysconfdir}/xrdp
	install -d ${D}${sysconfdir}/xrdp/pam.d
	install -d ${D}${sysconfdir}/sysconfig/xrdp
   
	# deal with systemd unit files
	install -d ${D}${systemd_unitdir}/system
	install -m 0644 ${S}/instfiles/xrdp.service.in ${D}${systemd_unitdir}/system/xrdp.service
	install -m 0644 ${S}/instfiles/xrdp-sesman.service.in ${D}${systemd_unitdir}/system/xrdp-sesman.service 
	sed -i -e 's,@localstatedir@,${localstatedir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
	sed -i -e 's,@sysconfdir@,${sysconfdir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service
	sed -i -e 's,@sbindir@,${sbindir},g' ${D}${systemd_unitdir}/system/xrdp.service ${D}${systemd_unitdir}/system/xrdp-sesman.service

	install -m 0644 ${S}/instfiles/*.ini ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/instfiles/pam.d/xrdp-sesman.debian ${D}${sysconfdir}/xrdp/pam.d/xrdp-sesman
	install -m 0644 ${S}/sesman/sesman.ini ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/sesman/startwm.sh ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/xrdp/xrdp.ini ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/xrdp/xrdp_keyboard.ini ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/instfiles/xrdp.sh ${D}${sysconfdir}/xrdp/
	install -m 0644 ${S}/keygen/openssl.conf ${D}${sysconfdir}/xrdp/
	install -m 0644 ${WORKDIR}/xrdp.sysconfig ${D}${sysconfdir}/sysconfig/xrdp/
	chown xrdp:xrdp ${D}${sysconfdir}/xrdp
}

SYSTEMD_SERVICE_${PN} = "xrdp.service xrdp-sesman.service"

pkg_postinst_${PN}() {
	if test -z "$D"
	then
		if test -x ${bindir}/xrdp-keygen
		then
			${bindir}/xrdp-keygen xrdp ${sysconfdir}/xrdp/rsakeys.ini >/dev/null
                fi
		if test ! -s ${sysconfdir}/xrdp/cert.pem
		then
			openssl req -x509 -newkey rsa:2048 -sha256 -nodes -days 3652 \
			-keyout ${sysconfdir}/xrdp/key.pem \
			-out ${sysconfdir}/xrdp/cert.pem \
			-config ${sysconfdir}/xrdp/openssl.conf >/dev/null 2>&1
			chmod 400 ${sysconfdir}/xrdp/key.pem
		fi			
        fi
}