Skip to content

Commit bcd41f5

Browse files
Первая версия блокировщика MySQL-сервера в режиме для чтения на GoLang
1 parent 0ec6660 commit bcd41f5

10 files changed

+428
-0
lines changed

Makefile

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
all: build
3+
4+
fetch:
5+
go get -u gopkg.in/ini.v1
6+
go get -u github.com/go-sql-driver/mysql
7+
touch $@
8+
9+
build: fetch
10+
go build -buildmode=exe -o mysql-readonly-lock main.go
11+
touch $@
12+
13+
clean:
14+
rm -vf mysql-readonly-lock
15+
rm -vf fetch build
16+
17+
.PHONY: clean fetch build

debian/README.Debian

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
mysql-readonly-lock-go
2+
----------------------
3+
4+
Set MySQL-server in readonly mode.
5+
6+
-- Sergey Dryabzhinsky <sergey@rusoft.ru> Fri, 21 Dec 2018 00:13:00 +0300

debian/changelog

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
mysql-readonly-lock-go (20181221-0rusoft1~trusty1) trusty; urgency=medium
2+
3+
* Initial release
4+
5+
-- Sergey Dryabzhinsky <sergey@rusoft.ru> Thu, 24 Dec 2015 17:08:36 +0300

debian/compat

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
7

debian/control

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
Source: mysql-readonly-lock-go
2+
Section: database
3+
Priority: extra
4+
Maintainer: Sergey Dryabzhinsky <sergey@rusoft.ru>
5+
Build-Depends: debhelper (>= 7),
6+
golang-github-go-sql-driver-mysql-dev | golang-bin-1.11-go | golang-1.10-go | golang-1.9-go,
7+
golang-gopkg-ini.v1-dev | golang-bin-1.11-go | golang-1.10-go | golang-1.9-go
8+
Standards-Version: 3.8.3
9+
Homepage: http://rusoft.ru
10+
11+
Package: mysql-readonly-lock
12+
Architecture: any
13+
Depends: ${shlibs:Depends}, ${misc:Depends}
14+
Provides: mysql-hosting-backup
15+
Description: MySQL for Rusoft - set server in readonly mode
16+
Written on Go language.
17+
Used in backup scripts by Rusoft.

debian/copyright

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
This work was packaged for Ubuntu by:
2+
3+
Sergey Dryabzhinsky <sergey@rusoft.ru>
4+
on Fri, 21 Dec 2018 00:13:00 +0300
5+
6+
Upstream Author(s):
7+
8+
Sergey Dryabzhinsky <sergey@rusoft.ru>
9+
10+
Copyright:
11+
12+
Read LICENSE file
13+
14+
License:
15+
16+
GPLv2
17+
18+
The Debian packaging is:
19+
20+
Copyright (C) 2018 Sergey Dryabzhinsky <sergey@rusoft.ru>
21+
22+
and is licensed under the GPL version 3,
23+
see `/usr/share/common-licenses/GPL-3'.

debian/mysql-readonly-lock.install

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
mysql-readonly-lock usr/local/sbin

debian/rules

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/usr/bin/make -f
2+
# -*- makefile -*-
3+
4+
# Uncomment this to turn on verbose mode.
5+
#export DH_VERBOSE=1
6+
7+
export MAKELEVEL=$(shell grep -c processor /proc/cpuinfo)
8+
9+
configure: configure-stamp
10+
configure-stamp:
11+
dh_testdir
12+
touch configure-stamp
13+
14+
build: build-stamp
15+
16+
build-arch:
17+
# Do nothing
18+
19+
build-indep:
20+
# Do nothing
21+
22+
build-stamp: configure build-arch build-indep
23+
dh_testdir
24+
GOPATH=$(CURDIR)/go make
25+
touch $@
26+
27+
install: build install-stamp
28+
install-stamp:
29+
dh_testdir
30+
dh_testroot
31+
dh_installdirs -A
32+
dh_install
33+
touch $@
34+
35+
clean:
36+
dh_testdir
37+
if [ -f Makefile ]; then $(MAKE) clean; fi
38+
rm -rf $(CURDIR)/go
39+
dh_clean
40+
rm -f *-stamp
41+
42+
# Build architecture-independent files here.
43+
binary-indep: install
44+
# We have nothing to do by default.
45+
46+
# Build architecture-dependent files here.
47+
binary-arch: install
48+
# We have nothing to do by default.
49+
dh_testdir
50+
dh_testroot
51+
dh_installchangelogs -a
52+
dh_installdocs -a
53+
dh_installman -a
54+
dh_link -a
55+
dh_strip -a
56+
dh_compress -a
57+
dh_fixperms -a
58+
dh_installdeb -a
59+
dh_shlibdeps -a
60+
dh_gencontrol -a
61+
dh_md5sums -a
62+
dh_builddeb -a
63+
64+
65+
binary: binary-indep binary-arch
66+
.PHONY: build clean binary-indep binary-arch binary install configure

debian/source/format

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.0 (quilt)

0 commit comments

Comments
 (0)