Compare commits

...

13 Commits

Author SHA1 Message Date
David Tomicek
94f044de0f depends on python3 2021-07-13 15:37:15 +02:00
David Tomicek
eb3e33eb96 docopt to build-depends, control 2021-07-13 15:22:21 +02:00
David Tomicek
06b50cf404 changed permissions, another var created, comments removed 2021-07-13 13:29:36 +02:00
David Tomicek
80c1c35bd8 requires.txt added to readme 2021-07-13 12:21:56 +02:00
David Tomicek
dd53a74f27 -n option for gzip (without timestamp) 2021-07-13 12:18:31 +02:00
David Tomicek
c31ec7bb24 fix - long description started with 1 space 2021-07-13 12:14:36 +02:00
David Tomicek
a96a4efa97 share lib from root, cp to tmp and gzip -9 changelog, also comments for trying 2021-07-13 12:11:16 +02:00
David Tomicek
af3e4c1eda readme update 2021-07-12 16:38:17 +02:00
David Tomicek
786e09178c changelog & copyright added 2021-07-12 16:36:34 +02:00
David Tomicek
5d4649c0a8 vars created 2021-07-12 16:15:59 +02:00
David Tomicek
110303ef6e chown changed to nums 2021-07-12 16:00:16 +02:00
David Tomicek
c61a0fc9e6 TODO comment 2021-07-12 15:25:24 +02:00
David Tomicek
0f6c7e89f7 docopt added for installation 2021-07-12 15:24:52 +02:00
6 changed files with 86 additions and 25 deletions

View File

@@ -2,11 +2,11 @@ Source: server22
Maintainer: commrat <something@hotmail.com>
Section: python
Priority: optional
Build-Depends: python3.8, dh-python, python3-setuptools, python3-all, debhelper (>= 9)
Depends: python3, python-docopt
Build-Depends: python3.8, dh-python, python3-setuptools, python3-all, debhelper (>= 9), python3-docopt
Depends: python3
Standards-Version: 3.9.6
Version: 13.2.2
Package: server22
Architecture: all
Description: Start a server, which listens on port 5000
And listens.
And listens.

View File

@@ -42,6 +42,11 @@ root dir where installation is applied:
├── Pipfile.lock
├── README.md
├── setup.py
├── share
│   └── doc
│   └── server22
│   ├── copyright
│   └── changelog
└── src
└── server22
├── __init__.py
@@ -63,6 +68,7 @@ dir created after installation:
│   ├── dependency_links.txt
│   ├── entry_points.txt
│   ├── PKG-INFO
│   ├── requires.txt
│   └── top_level.txt
└── share
└── doc

View File

@@ -1,46 +1,53 @@
#!/bin/sh
set -e -x
NAME="server22"
PATH_TMP="/tmp/$NAME"
PATH_USR="$PATH_TMP/usr"
# Deletes server22 dir from /tmp if exists (that was for testing)
sudo rm -rf /tmp/server22
sudo rm -rf $PATH_TMP
# Python installation executed, for debian layout and install it to /tmp/server22
python3 setup.py install --install-layout deb --root /tmp/server22
python3 setup.py install --install-layout deb --root $PATH_TMP
# Remove .egg-info and build dir from root folder
sudo rm -rf ./src/server22.egg-info
sudo rm -rf ./src/$NAME.egg-info
sudo rm -rf ./build
# Show actual tree of root dir to the user
tree
# Copy /DEBIAN to /tmp/server22
sudo cp -R ./DEBIAN /tmp/server22
# Copy /DEBIAN to /tmp/$NAME
sudo cp -R ./DEBIAN $PATH_TMP
# Deletes __pycache__ from /tmp/server22
sudo rm -r /tmp/server22/usr/lib/python3/dist-packages/server22/__pycache__
# Deletes __pycache__ from /tmp/$NAME
sudo rm -r $PATH_USR/lib/python3/dist-packages/$NAME/__pycache__
# Creates a dir: /tmp/server22/usr/share/doc/server22/
mkdir /tmp/server22/usr/share/
mkdir /tmp/server22/usr/share/doc
mkdir /tmp/server22/usr/share/doc/server22/
# Creates a dir: /tmp/$NAME/usr/share/doc/$NAME/
mkdir $PATH_USR/share/
mkdir $PATH_USR/share/doc
mkdir $PATH_USR/share/doc/$NAME/
# Add copyright and changelog.gz in created dir (It has to be done for debian packaging)
touch /tmp/server22/usr/share/doc/server22/copyright
touch /tmp/server22/usr/share/doc/server22/changelog.gz
# Copy share folder with subdirs to PATH_USR
sudo cp -r -v share $PATH_USR
# Zip the changelog
sudo gzip -9 -n $PATH_USR/share/doc/server22/changelog
# Change owners
sudo chown -R root:staff /tmp/server22
sudo chown -R root:root /tmp/server22/usr/share
sudo chown -R 0:50 $PATH_TMP
sudo chown -R 0:0 $PATH_USR/share
# Show actual tree of /tmp/server22 dir to the user
tree /tmp/server22
# Delete write permissions from group
sudo chmod -R g-w $PATH_USR
# Show actual tree of /tmp/$NAME dir to the user
tree $PATH_TMP
# dpkg will pack this modified folder to .deb
dpkg -b /tmp/server22
dpkg -b $PATH_TMP
# Show lintian output to the user. If there will be some red E, means that installation was not successful
lintian -c /tmp/server22.deb
lintian -c $PATH_TMP.deb
# Rename .deb package (name_of_the_package-version-binary)
dpkg-name -o /tmp/server22.deb
dpkg-name -o $PATH_TMP.deb

View File

@@ -7,8 +7,8 @@ setup(
version='2.2.2',
description='Start a server, which listens on port 5000',
long_description='Server waits on client to join on localhost:5000.',
#py_modules=['debcomm'],
packages=['server22'],
install_requires=['docopt'],
package_dir={'':'src'},
entry_points={"console_scripts": ["server22 = server22.server22:main"]},
)

View File

@@ -0,0 +1,27 @@
Change Log
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
[Unreleased] - yyyy-mm-dd
Here we write upgrading notes for brands. It's a team effort to make them as straightforward as possible.
Added
PROJECTNAME-XXXX MINOR Ticket title goes here.
PROJECTNAME-YYYY PATCH Ticket title goes here.
Changed
Fixed
[1.2.4] - 2017-03-15
Here we would have the update steps for 1.2.4 for people to follow.
Added
Changed
PROJECTNAME-ZZZZ PATCH Drupal.org is now used for composer.
Fixed
PROJECTNAME-TTTT PATCH Add logic to runsheet teaser delete to delete corresponding schedule cards.
[1.2.3] - 2017-03-14
Added
Changed
Fixed
PROJECTNAME-UUUU MINOR Fix module foo tests
PROJECTNAME-RRRR MAJOR Module foo's timeline uses the browser timezone for date resolution

View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Asterix a.s.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.