-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add mitmproxy spk #2557
base: master
Are you sure you want to change the base?
add mitmproxy spk #2557
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
PKG_NAME = ruamel.yaml | ||
PKG_VERS = 0.13.4 | ||
PKG_EXT = tar.gz | ||
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/r/$(PKG_NAME) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = cross/libyaml | ||
|
||
HOMEPAGE = | ||
COMMENT = | ||
LICENSE = | ||
|
||
include ../../mk/spksrc.python-wheel.mk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ruamel.yaml-0.13.4.tar.gz SHA1 2ef3884105b60c7723b7d74c83ed68d090d45d52 | ||
ruamel.yaml-0.13.4.tar.gz SHA256 a4d8cc1ac83796eb2104be57d41d318d53c1b8a7a4122d8637ad0b777c94b45c | ||
ruamel.yaml-0.13.4.tar.gz MD5 c6f0cc6922899103f81cc6226c629e57 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SPK_NAME = mitmproxy | ||
SPK_VERS = 0.18.2 | ||
SPK_REV = 1 | ||
SPK_ICON = src/mitmproxy.png | ||
|
||
WHEELS = src/requirements.txt | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To keep the flow in the file, should we perhaps format it as BUILD_DEPENDS, DEPENDS, WHEELS, SPK_DEPENDS, essentially in the order that the entries will be processed? |
||
SPK_DEPENDS = "python>=2.7.11-15" | ||
|
||
BUILD_DEPENDS = cross/python cross/setuptools cross/pip cross/wheel | ||
BUILD_DEPENDS += cross/ruamel cross/cffi cross/lxml cross/pillow | ||
DEPENDS = | ||
|
||
MAINTAINER = cytec | ||
DESCRIPTION = mitmproxy is an interactive, SSL-capable intercepting proxy with a console interface. | ||
DISPLAY_NAME = mitmproxy | ||
CHANGELOG = initial release of mitmproxy | ||
|
||
STARTABLE = no | ||
BETA = 1 | ||
|
||
HOMEPAGE = https://mitmproxy.org/ | ||
LICENSE = MIT | ||
|
||
INSTALLER_SCRIPT = src/installer.sh | ||
SSS_SCRIPT = src/dsm-control.sh | ||
|
||
INSTALL_PREFIX = /usr/local/$(SPK_NAME) | ||
|
||
include ../../mk/spksrc.spk.mk |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
rsc:share/wheelhouse |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
|
||
# Package | ||
PACKAGE="mitmproxy" | ||
DNAME="mitmproxy" | ||
|
||
# Others | ||
INSTALL_DIR="/usr/local/${PACKAGE}" | ||
|
||
case $1 in | ||
start) | ||
exit 0 | ||
;; | ||
stop) | ||
exit 0 | ||
;; | ||
status) | ||
exit 0 | ||
;; | ||
log) | ||
exit 0 | ||
;; | ||
esac |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
#!/bin/sh | ||
|
||
# Package | ||
PACKAGE="mitmproxy" | ||
DNAME="mitmproxy" | ||
|
||
# Others | ||
INSTALL_DIR="/usr/local/${PACKAGE}" | ||
SSS="/var/packages/${PACKAGE}/scripts/start-stop-status" | ||
PYTHON_DIR="/usr/local/python" | ||
PATH="${INSTALL_DIR}/bin:${INSTALL_DIR}/env/bin:${PYTHON_DIR}/bin:${PATH}" | ||
USER="mitmproxy" | ||
GROUP="users" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I belive the FTR, DSM6 users will not be member of the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On DSM6, I can confirm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ymartin59 Just to check: are you sure the |
||
VIRTUALENV="${PYTHON_DIR}/bin/virtualenv" | ||
TMP_DIR="${SYNOPKG_PKGDEST}/../../@tmp" | ||
|
||
SERVICETOOL="/usr/syno/bin/servicetool" | ||
|
||
syno_group_create () | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This function can be removed |
||
{ | ||
# Create syno group (Does nothing when group already exists) | ||
synogroup --add ${SYNO_GROUP} ${USER} > /dev/null | ||
# Set description of the syno group | ||
synogroup --descset ${SYNO_GROUP} "${SYNO_GROUP_DESC}" | ||
|
||
# Add user to syno group (Does nothing when user already in the group) | ||
addgroup ${USER} ${SYNO_GROUP} | ||
} | ||
|
||
syno_group_remove () | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ...as can this one |
||
{ | ||
# Remove user from syno group | ||
delgroup ${USER} ${SYNO_GROUP} | ||
|
||
# Check if syno group is empty | ||
if ! synogroup --get ${SYNO_GROUP} | grep -q "0:"; then | ||
# Remove syno group | ||
synogroup --del ${SYNO_GROUP} > /dev/null | ||
fi | ||
} | ||
|
||
preinst () | ||
{ | ||
exit 0 | ||
} | ||
|
||
postinst () | ||
{ | ||
# Link | ||
ln -s ${SYNOPKG_PKGDEST} ${INSTALL_DIR} | ||
|
||
# Create a Python virtualenv | ||
${VIRTUALENV} --system-site-packages ${INSTALL_DIR}/env > /dev/null | ||
|
||
# Install the wheels | ||
${INSTALL_DIR}/env/bin/pip install --no-deps --no-index -U --force-reinstall -f ${INSTALL_DIR}/share/wheelhouse ${INSTALL_DIR}/share/wheelhouse/*.whl > /dev/null 2>&1 | ||
# Create user | ||
adduser -h ${INSTALL_DIR}/var -g "${DNAME} User" -G ${GROUP} -s /bin/sh -S -D ${USER} | ||
|
||
# Correct the files ownership | ||
chown -R ${USER}:root ${SYNOPKG_PKGDEST} | ||
|
||
exit 0 | ||
} | ||
|
||
preuninst () | ||
{ | ||
# Stop the package | ||
${SSS} stop > /dev/null | ||
|
||
# Remove the user if uninstalling | ||
if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then | ||
delgroup ${USER} ${GROUP} | ||
deluser ${USER} | ||
fi | ||
|
||
# Remove firewall config | ||
if [ "${SYNOPKG_PKG_STATUS}" == "UNINSTALL" ]; then | ||
${SERVICETOOL} --remove-configure-file --package ${PACKAGE}.sc >> /dev/null | ||
fi | ||
|
||
exit 0 | ||
} | ||
|
||
postuninst () | ||
{ | ||
# Remove link | ||
rm -f ${INSTALL_DIR} | ||
|
||
exit 0 | ||
} | ||
|
||
preupgrade () | ||
{ | ||
# Stop the package | ||
${SSS} stop > /dev/null | ||
|
||
# Save some stuff | ||
rm -fr ${TMP_DIR}/${PACKAGE} | ||
mkdir -p ${TMP_DIR}/${PACKAGE} | ||
mv ${INSTALL_DIR}/var ${TMP_DIR}/${PACKAGE}/ | ||
|
||
exit 0 | ||
} | ||
|
||
postupgrade () | ||
{ | ||
# Restore some stuff | ||
rm -fr ${INSTALL_DIR}/var | ||
mv ${TMP_DIR}/${PACKAGE}/var ${INSTALL_DIR}/ | ||
rm -fr ${TMP_DIR}/${PACKAGE} | ||
|
||
exit 0 | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
https://github.com/mitmproxy/mitmproxy/archive/v0.18.2.tar.gz | ||
backports.ssl_match_hostname>=3.5.0.1, <3.6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All the versions in this file should be pinned to exactly 1 version ( |
||
blinker>=1.4, <1.5 | ||
click>=6.2, <7.0 | ||
certifi>=2015.11.20.1 # no semver here - this should always be on the last release! | ||
configargparse>=0.10, <0.12 | ||
construct>=2.5.2, <2.6 | ||
cryptography>=1.3, <1.6 | ||
cssutils>=1.0.1, <1.1 | ||
Flask>=0.10.1, <0.12 | ||
h2>=2.4.1, <2.5 | ||
html2text>=2016.1.8, <=2016.9.19 | ||
hyperframe>=4.0.1, <5 | ||
jsbeautifier>=1.6.3, <1.7 | ||
passlib>=1.6.5, <1.7 | ||
pyasn1>=0.1.9, <0.2 | ||
pyOpenSSL>=16.0, <17.0 | ||
pyparsing>=2.1.3, <2.2 | ||
pyperclip>=1.5.22, <1.6 | ||
requests>=2.9.1, <2.12 | ||
six>=1.10, <1.11 | ||
tornado>=4.3, <4.5 | ||
urwid>=1.3.1, <1.4 | ||
watchdog>=0.8.3, <0.9 | ||
brotlipy>=0.5.1, <0.7 | ||
ruamel.yaml>=0.13.2, <0.14 | ||
hpack==2.3.0 | ||
typing==3.5.2.2 | ||
enum34>=1.0.4, <2 | ||
ipaddress>=1.0.15, <1.1 | ||
backports-abc>=0.4 | ||
itsdangerous==0.24 | ||
singledispatch==3.4.0.3 | ||
argh>=0.24.1 | ||
pathtools>=0.1.1 | ||
editorconfig>=0.12.0 | ||
Jinja2>=2.4 | ||
Werkzeug>=0.7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could use some info here ;)